Member
Member
joninbelgium   2012-07-09, 14:08
#1

Hi,

I would like to show the following link ONLY on subalbums and not on the main albums:

I'm sure there must be some kind of way to differentiate albums and subalbums with an IF statement but I'm not aware of one.

Any help would be greatly appreciated!!!
Thanks

Administrator
Administrator
acrylian   2012-07-09, 14:52
#2

There is a album class method getParent(). So try if($_zp_current_album->getParent())) { ....} should be it.

Member
Member
Michel Gagnon   2012-07-09, 15:41
#3

If your theme is already mature, another possibility would be to enable the "multiple_layouts" extension and have different layouts for your main albums and subalbums.

Basically, open your "theme" folder, copy "album.php" in the same folder as "albumwithoutslideshow.php", remove the slideshow from the latter and voilà! You then select "albumwithoutslideshow.php" as the one to use for main albums and other circumstances where you don't want the slide show.

Advantage of this method: you have an even greater design flexibility.
Drawback: if you modify your theme, you have two pages to update.

Administrator
Administrator
acrylian   2012-07-09, 16:05
#4

Yes, that's a way but probably a little too much if it is just about this one link.

Member
Member
joninbelgium   2012-07-10, 10:44
#5

Thank you both for the great tips...acrylian, I tried yours and it worked well, but I went with Michel's suggestion in the end as it gave me the opportunity to customise my album pages further, which I'd wanted to do for a while.

Zenphoto rules, thanks for the support!

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