Member
Member
hanshenderickx   2007-11-11, 14:54
#1

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??

Member
Member
sbillard   2007-11-11, 17:37
#2

You should look at printAlbumMenu.php. It is not quite what you want, but you should be able to modify it.

Member
Member
hanshenderickx   2007-11-12, 11:12
#3

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 :
`[list]

[*]Houses

[/list]`

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!

Member
Member
sbillard   2007-11-12, 17:04
#4

$_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 { ??? }`

Member
Member
hanshenderickx   2007-11-12, 18:36
#5

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.

Administrator
Administrator
acrylian   2007-11-12, 19:09
#6

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.

Member
Member
senne   2007-11-22, 13:42
#7

Hans, do you already have something worked out? I'm looking for something like you too.

Member
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.