active class on own pages (zpMasonry)

Hey guys,

I am within the last few changes on my own zenpage, kinda impressive how mighty this piece of code is!

Still got a problem with my own pages :/ Running the latest nightly build with Zenpage and jpmasonry. So if I add new pages like "Contact" they are displayed correctly, no problem but the main link on top isn't shown in black like the other one if they are active. Hope you know what I want to say ^^

Inside the inc-menu.php there is a block called "<?>class="active"..." in front of everything except this one `<?php printPageMenu('list-top','','active','','active','',true,false); ?>`
Tried to figure out how "printPageMenu" is working and think I've got the right settings, but yeah, it is not shown in black ^^

Comments

  • acrylian Administrator, Developer
    I am assuming you refer to the theme "zpMasonry" so I changed the topic title in that regard.

    I am not familiar with the theme but printPageMenu() is a standard Zenpage plugin function and does add an active class. Maybe the css is not correctly setup?

    That is is generally working you see on our own site for example:
    http://www.zenphoto.org/pages/development
  • Was not sure about the right section for my post since "printPageMenu" is a standard plugin ;)

    The site is working and the link as well, just for my 2 pages I created with the admin panel are not shown in black and bold (the link on top)

    Here is the snippet I talk about:
    `
    class="active" <?php } ?>>"><?php echo
    gettext('News'); ?>

    <?php printPageMenu('list-top','','active','','active','',true,false); ?>
    <?php } ?>
    `
    as you can see for the news.php you're declaring the class "active" and for the printPageMenu as well but it's not working for the printPageMenu --- damnit I know where the problem is but I can't solve it -.-

    EDIT
    There is nothing wrong with the CSS, it has to be a problem with the theme cause if I check the source code on the open page it's giving me the right active class
  • Here is a link for better understanding:

    http://i1131.photobucket.com/albums/m556/Muffel2k/regr.png

    If I click on "Gallery" or "News" (which are not created by printPageMenu) they're shown in black if active, the other two are still showing in blue
  • acrylian Administrator, Developer
    I did understand but I really can't help. Try the page menu in the Zenpage theme. If that does highlight it is a theme css issue. (I have no idea how this theme creates the menu).
  • Did it and it's working there so it is a "problem" with this theme and I have to wait until someone can help me ;)

    Thanks anyway :)
  • gjr Member
    It is working on my demo (gjr-web.com), so if you could provide a live link, I could maybe help further, otherwise it is just guessing.
  • and btw, it's not working on your demo, watch the color of "About" and "Archive", it's staying blue instead of changing into white ;)
  • gjr Member
    Ok, misunderstood, indeed the font color is not changing on active for the page menu. This is because it assigns the 'active' class to the <anchor> tag, while the styling was for the li.active a. Easy fix, add #nav a.active as per below:

    If using the dark version, dark.css (around line 77):
    `

    h1#logo a, h1, h2, h3, #nav li.active a, .date, .counts, .tags, #copy, input, textarea, select, .side-menu li a, #cycle li h3 a, #ss-title, #nav a.active {

    color: #FFFFFF;

    }

    `
    or if using the light version, light.css (around line 77):
    `

    h1#logo a, h1, h2, h3, #nav li.active a, .date, .counts, .tags, #copy, input, textarea, select, .side-menu li a, #cycle li h3 a, #ss-title, #nav li a.active {

    color: #111111;

    }

    `
  • gjr, you made my day!

    Exactly the last CSS line was missing and I was fooling around with the PHP code *ouch*

    Thank your for your support
  • acrylian Administrator, Developer
    I have not looked yet, so is the pagemenu being inconsistent to the other menus like the album menu? Then we should probably fix this as all should be the same.
Sign In or Register to comment.