Zenpage navigation on homepage

fretzl Administrator, Developer
Zenphoto 1.2.8 - Zenpage-Default theme

I'm working on a simple site using only Zenpage(using the printPageMenu()).
testsite (server is a slow starter)
In custom theme options I've selected a homepage.
All is fine except that I can't set the homepage link (home) to active.(there's no class assigned)
I'd like the homepage link to be active when you enter the site and also when you click it after visiting another page.

Any suggestions ?

Thanks

Comments

  • acrylian Administrator, Developer
    Hm, the page menu does not support the "home page" feature as that home page is internally actually the `index.php` page. I suggest to use a hardcoded link for the home page and use `$_zp_gallery_page` to check that.
  • fretzl Administrator, Developer
    Thanks. I'll give it a try.
  • acrylian Administrator, Developer
    I have to correct myself. I just tried with Zenpage default and the current svn: The page chosen for homepage is selected as active in the page menu. Of course the problem is that only unpublished pages can be used as a homepage so it does not appear in the menu if not logged in anyway. (otherwise the menu would be confusing, wouldn't it?).

    The home page is internally not the `index.php` but in this case `pages.php` as that is loaded instead.

    You still have to put a a hardcoded link and check for the page directly like `$_zp_current_zenpage_page->titlelink == ""`; Or you make a custom function out of it that also shows unpublished pages or this specific one.

    I guess I also put a kind of `is_Homepage()` helper function on my list...
  • fretzl Administrator, Developer
    Thanks again !
    Ofcourse I like your idea of a helper function the most ;-)
  • acrylian Administrator, Developer
    Sometimes even devs loose track of what's available. You can already use `if (checkForPage(getOption("zenpage_homepage"))) {...}` to do the same (used on Zenpage theme's index.php).
  • fretzl Administrator, Developer
    Great ! I'll give it a go.
    Thanks again.
Sign In or Register to comment.