Hi, this is what I'd like to do and I found no threads about it: would it be possible to have a code that says "if the parent album is called XY, then do this"...
Something like this
{if $theme.pageType == 'album'} {g->theme include="album.tpl"} {elseif $theme.pageType == 'photo'} {g->theme include="photo.tpl"} but this time it should look at the parent album's name.
Posts: 27300
{$theme.parent.title|markup}
Should get you the title of the parentDave
____________________________________________________
Blog with G2 || Gallery Frames / Mods || G1 Test Gallery
Posts: 123
Hello, after 4 years I'm back on this matter (I abandoned that idea then, but now I need it again and I still don't know how).
So, should it be something like this?
Posts: 27300
Should, but I have not tested.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 123
Now it works, I had forgotten the space in "else if".
So, if anyone needs it, it's:
Posts: 123
Excuse my ignorance, but how do I instruct it to do something else if the title is neither Male nor Female?
For example the root album (and others) shouldn't do anything, but how do I tell Gallery so?
I tried some combinations of IF and ELSE IF and ELSE, but they were really shots in the dark.
thanks
Stefano
Posts: 8339
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 123
Thank you, that's what I thought and tried, but it doesn't work.
This is what I have:
but with the final {else} it doesn't work, the page stops loading there. If i remove it, it works (but I get javascript-2 on the root album and other ones).
Posts: 8339
that is the correct usage.
http://www.smarty.net/manual/en/language.function.if.php
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 123
thanks Suprsidr, I got it!
If I use the final {else}, I must write {elseif} instead of {else if}.
On the contraty, if I don't use the final {else}, I must write {else if} (or I get nothing!)
thanks a lot