Direct link to subalbum

Hello,
I have my main albums (as categories) listed on the index page. I'd like to get a direct lik to the first subalbum in that category/main album.
Then, on the album page, i'd like to include a list of all the subalbums with the same parentid.
Is there a way to do this??

Comments

  • You should look at printAlbumMenu.php. It is not quite what you want, but you should be able to modify it.
  • Ok, this is quite complicated. I created a function which selects the subalbums based on 'parentID' and puts them in a list. For now, I've tested with a static parentID. This works.
    What I need is to pass the ID from a mainalbum (where parentID=NULL) listed on the indexpage to the albumpage. Something like :
    ``

    On the albumpage, I capture the ID, run a query through the subalbums, based on this and, I get a list of the subalbums in this mainalbum.

    I know mod_rewrite will be fucked up, but I'm not planning to use it.

    I can't seem to capture the ID of the parentalbums, however.

    This is driving me nuts. Some help would be very appreciated!
  • `$_zp_current_album->getParent()->getAlbumId()`

    But, you have to be careful. Gallery level albums do not have a parent, so it should probably be:

    `$parent = $_zp_current_album->getParent();

    if (!is_null($parent)) { $id = $paretn->getAlbumId(); } else { ??? }`
  • Thank you very much!! I will try. I know gallery level albums have NULL for parentId.

    I'm trying to create a whole different navigation on the client level - will use main albums as buttons who pass directly to sublevel album with highest ranking. Sublevel album will have integrated navigation to albums with same parent.

    If this works, I will share. It might be usefull to someone. I have to say the admin part in the new version is brilliant!
    Thanks again.
  • acrylian Administrator, Developer
    That would be very interessting if you get this done. When I made the album menu function a while ago (it's included in zenphoto in zp-core/plugins, but it's actually a custom function), I did not know / realize that zp can have several subalbum levels. It works fine with one level.

    I am planning to update it and thought about using the folder path table in the db for that somehow. Probably you will be quicker. Maybe we could join the functions afterwards.
  • Hans, do you already have something worked out? I'm looking for something like you too.
Sign In or Register to comment.