ZenphotoCMS Forum
Parent Album name - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Parent Album name (/thread-2005.html)



Parent Album name - farhan - 2007-12-31

Hello,

Is there any way to show parent album name other then the breadcrumb thing ?

I have it like for each user

User > Subalbums > Subalbums
User2 > Subalbums > Subalbums

And i need to show the User album name on the subalbum pages but seperately then the bedcrumbs on top...

Any way?




Parent Album name - elderz - 2007-12-31

I think this is what you were going for.

If all you need is the name, calling:
``

should work. If you need it to be a link to the gallery index, try using:
`




Parent Album name - farhan - 2007-12-31

Hmm, that just shows "Object"




Parent Album name - elderz - 2007-12-31

Sorry, you want $aGalleyIndex[0]->getTitle() or it looks like you could just call echo printGalleryTitle()




Parent Album name - farhan - 2007-12-31

Sorry to bother you again but let me explain what i need again.

I have 10 main albums called User1, User2, blah blah . and i have 2 level sub albums in all of the main albums.

What i want to do is Show main album name on Top of the subalbums.

Like if i am on

User1> Trips > Someplace

I want to show User1 on top of the page.

printGalleryTitle() prints the gallery title, i don't need that.

Thanks in advance if anyone can help




Parent Album name - elderz - 2007-12-31

Ahh ok. I think I understand. On mine, I have it set to show the breadcrumbs with the gallery root in the breadcrumbs. So mine might look like Gallery > User1 > Trips > Someplace. What you can do for that is use that code snippet from before. Instead of [0] we want [1]. The albums are stored in an array [Gallery, User1, Trips]. I haven't tested any of this, but try this:
``

Let me know if that works.




Parent Album name - farhan - 2008-01-01

Nope i get a error

Fatal error: Call to a member function on a non-object in

themes\binary\album.php on line 32

Line 31 and 32 are




Parent Album name - farhan - 2008-01-01

anyone can help me on this ? please




Parent Album name - farhan - 2008-01-01

ok that is working when i am in User > album or USer > Album > Album

But when i am just on user it gives the Fatal error: Call to a member function on a non-object in error

ANy fix for that ?

Or any way of just showing this code in the sub albums and not the main ?

Thanks a lot for your help so far elderz




Parent Album name - farhan - 2008-01-01

ok i don't have too much clue to what's going on here but i finally managed to do it.

It displays The main album title in any of it's subalbums or there subalbums.

If anyone can tell me what's happening there, that would be great too




Parent Album name - sbillard - 2008-01-02

Gallery level albums--those displayed on the index.php page--do not have parent albums (getparentAlbums() will be empty). That is why you need the if ($aGalleryIndex =getParentAlbums()) { test.




Parent Album name - elderz - 2008-01-03

sorry about that farhan. I was out of town for a few days. I didn't realize that the gallery is not considered a parent album so it makes sense that getParentAlbums() wouldn't work.




Parent Album name - farhan - 2008-01-04

no problems elderz, many thanks for your help