ZenphotoCMS Forum
image_album_statistics / Get parent album title - 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: image_album_statistics / Get parent album title (/thread-4652.html)



image_album_statistics / Get parent album title - PashaXIII - 2009-02-09

Hi, sorry to trouble you.

Situation:

Album
|
|
Subalbum_1 | Subalbum_2 ---Pictures
|
|
Pictures

When I use printLatestUpdatedAlbums with showtitle it return "Subalbum1" and "Subalbum2" as titles , I have change $tempalbum->getTitle() to $tempalbum->name

and got "Album/Subalbum_1" and "Album/Subalbum_2" as title.

It's possible to get only "Album" without "Subalbum_1" in title name ?




image_album_statistics / Get parent album title - acrylian - 2009-02-09

You need to understand the difference between the title and the unique name/folder.

Anyway, yes, $parentalbum = $tempalbum->getParent(); $parentalbumtitle = $parentalbum->name
http://www.zenphoto.org/documentation/classes/Album.html#methodgetParent




image_album_statistics / Get parent album title - PashaXIII - 2009-02-09

Many thanks, works fine!

You can thought what this is joke but I really read docs and try to insert getParent() I even saw similar code, as you gave, here in forum... I must be more attentive

Once more thanks!