Hi everybody,
Just testing G2 and I came across a problem. I'm trying to customize the Siriux theme and I want some things to change when you view a photo, e.g. another background color and hiding the menu.
So, I'd like to know how the 'if issit' works. A solution for my problem is to include another stylesheet on the photo page. Something like this:
Quote:
{if $theme.pageType == 'photo'}
{show /style1.css and hide /style.css"}
{/if}
and the menu one:
Quote:
{if $theme.pageType == 'photo'}
{hide div named menu"}
{/if}
The difference between those two examples is that the first one is a change to something in the <head> of the page and the second one could maybe be added in photo.tpl.
I'm stuck, thank you for help in advance!
Posts: 8339
An esier solution may be to embed your gallery into your site.
I have many tools and examples here.
But to answer your question...
both would likely go into theme.tpl as the <head /> is there ;) and the menu is likely used across other gallery pageTypes and would be part of the main page structure.
and using the != (not equal)
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 6
Thank you, I get the point of the 'if' code. Going to have a look at the embedding too.
Posts: 4342
or something like
Posts: 6
Great support guys, thanks.
I got another question, is it possible to show an 'absolute' link to the original album of a photo when shown in a tagged album? A tagged album shows only the 'relative' link to the tagged album itself.
Maybe it's also possible with this if structures?
Posts: 4342
Isn't there a setting in the admin page for the tags module that says something like "show items in original albums"?
Otherwise, I'm not quite sure what you mean - perhaps some examples would be helpful.
Posts: 6
No, there isn't a setting available. Well, I can explain:
We want to view photos with the tag nature, so we go to example.com/tag/nature. We click a photo and the breadcrump on that page shows Home / Results with tag: Nature/tree.jpg
Note that tree.jpg is originally in the album 'Trees' (that's what I call the 'absolute' location for this photo). So when someone views this photo in a tagged album, he/she doesn't get a chance to go to the original album. That's because there's only the link back to the tagged album (what I call the 'relative' album, because it's not the album to which tree.jpg originally belongs).
Hope you get my point. When a photo is shown in a tagged album, how to present a link back to the 'original' album that photo belongs to.
Posts: 4342
There is definitely a setting somewhere for "display in original album", because I spent some time trying to get it to function correctly in various dynamic-album modules I wrote. I'll keep investigating until I find it.
Posts: 4342
Found it. It's a theme setting, so may not be available in your theme. Look for "thumbnail links in dynamic albums" and set it to "jump to original album".
If it doesn't exist in your theme then you'll have to do some modifications. Switch to Matrix theme to examine how it works.
Posts: 6
I got it, thanks. It wasn't available in my theme, I'm going to fix that.