Printalbummenu when viewing a page

I want to use both the printalbummenu and the printpagemenu in my sidebar, but somehow I can't get this to work. When viewing an album, both the menu's are displayed, but when I click on a the link of a page, the printalbummenu items disappear.

You can see what I mean by clicking on the link 'nieuwste' or 'freelance opdrachten' in the sidebar: link

Comments

  • acrylian Administrator, Developer
    Depending on how your theme is setup you probably forgot to include it on those pages' sidebar. Look at the zenpage theme.
  • I don't thinks so, because this sidebar remains the same, no matter if I choose a page or album:

    `
    <?php
    printAlbumMenu('omit-top',NULL,'beeldend','topalbum','subalbum','subsubalbum','',2,false);
    ?>


    <?php
    echo "<ul id=\"subdivisions\">";
    $hoofdalbum = getAlbumLinkURL();
    $zenpagina = getPageURL($page);
    $fotografie = 'fotografie';
    $pos = strpos($hoofdalbum, $fotografie);
    if ($pos==true) {
    set_Context(ZP_ZENPAGE_PAGE);
    $_zp_current_zenpage_page = new ZenpagePage("fotografie");
    printPageMenu("omit-top","","menu-active","submenu","menu-active");
    }
    echo "";
    ?>


    `
    The reason for the php code in front of the printPageMenu is because later I want to add another gallery with its own subpages displayed.
  • acrylian Administrator, Developer
    Well, you have set the printAlbumMenu to "omit-top". That means it leaves out the toplevel album display and displays only the subalbums of a current top level album. If there is no current toplevel album as it is not on the pages nothing is shown. Absolutly coded behaviour.

    Either you change it to use toplevel albums for that or you have to set the current toplevel album manually similar to `$_zp_current_zenpage_page = new ZenpagePage("fotografie");`. There are functions for that makeCurrentAlbum() (please see the doc for exact details.).
  • I've read the intstructions, but cant't get makeAlbumCurrent() to work.
    Could you give me a little help with this?
  • acrylian Administrator, Developer
    You need to create an object of the album your subalbums belong to. And then make that album object to the current album. Please review the object model framework tutorial.
Sign In or Register to comment.