I am trying to implement a "back to %s" button in my gallery
The layout is as follows:
main gallery
Sub-gallery "photos"
sub-sub-gallery "location1"
sub-sub-gallery "location2"
sub-sub-gallery "location3"
Sub-gallery "videos"
sub-sub-gallery "location"
I can create a link above the photos to take me back to ../
so if I'm in "photos/location1" the link takes me to "photos" and from "videos/location" back to "videos"
I want to have the link show the parent albums name.
ex.
you are on a photo page in sub-sub-gallery "location1" the link text is "back to Photos"
I don't know how to get the parent/parent album title.
something like:
{g->text text="Back to %s" arg1=$somevariable}
Hope this makes sense
thanks
Posts: 8339
{$theme.item.parent.title}
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 7
{g->text text="Back To %s" arg=$theme.item.parent.title}
Just prints:
Back To %s
on the page!
Posts: 8339
set debug to buffered in config.php
it will popup a smarty window that contains all the available variables for the current page.
not all themes have the same variables.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 7
<a href="">{$theme.parent.title|markup}</a>
gives me a link, but it is to the parent sub-sub-gallery "location1", not the "photos" gallery
does that make it clearer?
Posts: 8339
{g->text text="Back To %s" arg=$theme.parent.title|markup}
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 7
I got it to work but it's a pretty poor hack:
borrowed some code
it does give me the name "Photos", or "Videos" though.
I just don't like the "../"
oh well, I'll just keep at it.
Thanks!
Posts: 7
Working!