can album.tpl "know" when it's the top-level album?
scormeny
Joined: 2006-06-27
Posts: 68 |
Posted: Wed, 2006-10-04 01:13 |
I have a website for a catalogue and am using Gallery to organize the pictures -- it is looking really good! Some items in the catalogue have only one photo, and some have more than one photo. When an item has one photo, I just want to add it as an "item". When an item has more than one photo, I want to add it as a "sub-album". I am also using the lightbox js plugin for close-ups of my pictures. I have managed to modify album.tpl with an if statement that says if an item is a sub-album, don't try to "lightbox" it. However, I'd also like to make it so that if I'm in the top-level album/directory, no pictures will be "lightboxed." The site in progress is at http://joshuahellerrarebooks.managebest.net/artistsbooks/ Is there some sort of variable or identifier that I could use to say, essentially, "if the current album is the top-level album, then ..."? Or alternatively and perhaps more extensibly, "if the current album has XX [or YY] id, then ..." Thank you for advice! -Sara, |
|
Posts: 1023
Yes, use {if empty($theme.parents)} to insert code for the first Page,
CU
Lutz
Gallery version = 2.2-svn core 1.1.17
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
Posts: 68
Thanks so much -- that's very simple and easy to implement, I appreciate it!
Take care, Sara
PS If you happen to see this again, Lutz, can you let me know -- can you see anything at http://joshuahellerrarebooks.managebest.net/artistsbooks/ ? The client is telling me they can't see the site, but I can without a problem, whether I'm logged in as an administrator or not. I am trying to pinpoint the problem, and was hoping if I can find someone else who can see it I can eliminate some kind of IP address thing or something.
Thanks.
Posts: 1023
Sara, I can see the albums at the adress you've provided
CU
Lutz
Gallery version = 2.2-svn core 1.1.17
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
Posts: 68
Thanks -- I appreciate your taking a look.