Rename some sidebar divs please

This topic contains 6 replies, has 5 voices, and was last updated by  purpleedge 10 years, 1 month ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #12946

    purpleedge
    Expired Member
    Post count: 539

    In geodirectory_hooks_actions.php you use the same div name for 6 separate sections in the sidebar…

    <div class="geodir-company_info">

    …is it possible that you could append a number or distinguishing name to these separate instances?

    I am formatting the print output and I want to be able to hide 4 of them because they are not relevant to a print of a detail listing.

    Or is there some other way I can distinguish these divs?

    #12949

    Simone
    Expired Member
    Post count: 3515

    Hmmyeah true the block shares the same id…I’ll summon Stiofan

    #12953

    John Allsopp
    Expired Member
    Post count: 399

    Hi,
    You could use nth-of-type to distinguish eg:

    
    
    .geodir-company_info:nth-of-type(4) {
         background: #eee;
    }
    #12960

    Paolo
    Site Admin
    Post count: 31206

    @simone, they are classes, not IDs, they can be identical.

    Personally I’d use nth-child css property:

    
    
    /* hide the part with edit, upgrade and favorite link
    .geodir-company_info:nth-child(3) {
        display: none;
    }

    http://www.w3schools.com/cssref/sel_nth-child.asp

    all the other divs have unique class too so editing their css should be easy:

    geodir_more_info post (addess)
    geodir_more_info geodir_timing (Hours)
    geodir_more_info geodir_contact (Phone n.)

    ecc.

    Let us know if this is enough.

    #12964

    purpleedge
    Expired Member
    Post count: 539

    Ok, if you’re not prepared to distinguish them I’ll try the nth technique and hope I can consistently know which one I am hiding. I don’t think hiding the contents of the divs will hide the borders?

    #12983

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi purple, i have added unique classes to them and this will be in the next version.

    Thanks,

    Stiofan

    #12994

    purpleedge
    Expired Member
    Post count: 539

    Thank you Stiofan!

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount