Hey guys,
I want to be able to have my individual picture pages reflect the album title instead of the crappy looking picture file names.
Is there a way to tweak this part of the code: {$theme.item.title|markup}
in order to make it take the title of the album.
For example: I want to make each picture in the "Ferrari" album say "Ferrari" at the top, not "ferrari_f550_1.jpg" without changing the individual titles.
Thanks much,
David.
Posts: 27300
{$theme.parent.title}
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 12
YOU ARE AMAZING SIR! Thanks for the help
Posts: 12
I had another quick one. Any idea where to insert a <title> tag? I want to use the same {$theme.parent.title} with Photos after it, but I am not sure where to add it. Here is the top of my code.
{*
* $Revision: 16235 $
* Read this before changing templates! http://codex.gallery2.org/Gallery2:Editing_Templates
*}
{if !empty($theme.imageViews)}
{assign var="image" value=$theme.imageViews[$theme.imageViewsIndex]}
{/if}
<h2>{$theme.parent.title} Photos</h2>
Just wondering if there is a way.
Thanks,
D
Posts: 12
I am also trying to create a code that I can put into the theme template that will read the {$theme.item.title|markup} for the albums page and the {$theme.parent.title} for the pictures page into the title and keyword tags. Any ideas if I can do that?
Posts: 27300
the <title> tag is generated in theme.tpl:
<title>{$theme.item.title|markup:strip|default:$theme.item.pathComponent}</title>
if you want to change it for the photo page only then you will have to work in a {if} statement. se lower down in the code for an example
Dave
____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 12
Got it, and just for reference, here is how I did it:
{if $theme.pageType == 'photo'}
<title>{$theme.parent.title}</title>
<meta name="description" content="{$theme.parent.title}">
<meta name="keywords" content="{$theme.parent.title}">
{elseif empty($head.title)}
<title>{$theme.item.title|markup:strip|default:$theme.item.pathComponent}</title>
<meta name="description" content="{$theme.item.title|markup}">
<meta name="keywords" content="{$theme.item.title|markup}">
{/if}
It tells the server that if it is one of my photo pages, it needs to get the wording from the parent page's title and if it is any other page, get it from that page's title.
Easy stuff, took 5 minutes and I have never written a line of code in my life.
Posts: 27300
Cool!
now you can call yourself a theme developer as well
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team