I have a site structure which is this
galleryroot --> albums --> photos etc
However the way I interface with the gallery is to not use the root but jump into the albums bit. Each album is called something different.
I would like to know if there is a smartytag code for the "album you are currently in" so that I can use it as the page title. Currently I use this {$theme.item.title|markup} but that gives the title of the current object.
Thanks for your time!
Posts: 16503
If you put Gallery into debug mode you can see all the Smarty variable information available to you in the Smarty Debug popup window:
FAQ: How to set/use Gallery in debug mode?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 22892
Is this what you are after:
http://gallery.menalto.com/node/73028
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 18
Utterly brilliant. Dave you are a genius! Code I used from the above link to capture the album one above root.
{foreach name=parent from=$theme.parents item=parent} {if $smarty.foreach.parent.total ==1} {* DISPLAY CURRENT ALBUM TITLE *} <p><a href="">{$theme.item.title|default:$theme.item.pathComponent|markup:strip}</a></p> {elseif $smarty.foreach.parent.iteration ==2} {* DISPLAY FIRST CHILD AFTER ROOT OF CURRENT ALBUM TREE *} <p><a href=""> {$parent.title|markup:strip|default:$parent.pathComponent}</a></p> {/if} {/foreach}I added the href so I can link back to my home page using the title.
I also came up with this last night which almost achieves the same thing and might be useful for someone else. If its an album display the name of the album. If its a photo display the parent album.
{if $theme.pageType == 'album'} <p><a href="">{$theme.item.title|markup}</a></p> {elseif $theme.pageType == 'photo'} <p><a href="">{$theme.parent.title|markup}</a></p> {/if}Posts: 22892
Glad you got it sorted and posting your findings for others.
HOw does it feel to be a theme developer now?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 18
Well I have a couple of other bits to sort out, once I have done that I could call myself a theme developer! :D