Page title tag auto generated from Gallery problem

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Page title tag auto generated from Gallery problem

Post by fearmydesign »

Hi there, I'm having a problem that I can't seem to figure out although I've found the "exact" answer on this forum here: http://forum.cmsmadesimple.org/viewtopi ... 51#p252651

I'm really confused and have tried many different options. I'm 100% sure that I have the correct code in the right places, but still not working.

Problem

Just trying to get the Gallery module to display the $gallerytitle as the page <title>.

On my Gallery template I have the following line of code to set the correct variable:

Code: Select all

{if !empty($gallerytitle)}<h3>{$gallerytitle}</h3>{assign var='gallery_title' value=$gallerytitle}{/if}
Then on the page template displaying the Gallery photos, I have the following:

Code: Select all

<title>{sitename} - {title}{if isset($gallery_title)} - {$gallery_title}{/if}</title>
I also tried it this way:

Code: Select all

{if isset($gallery_title)} <title>{$gallery_title}</title> {else} <title>{title}</title> {/if}
I have tried so many different variations of the code, but nothing seems to work. Could there be something wrong with my Smarty installation?

For example, this page's title should be Cambria Countertops, but instead it just shows Gallery - the main gallery title. But you can see that the h3 tag is pulling the correct title on the page itself: http://www.gandmexpress.com/gallery/Cam ... -Photos/63

I checked System Maintenance: No structural errors were detected in the database
System Information doesn't seem to have any errors!
I cleared the Cache.
I'm currently using CMSMS version 2.1.1
Gallery module version 2.1 (I know the latest is 2.1.5 but I was scared to upgrade until I figure out the problem)

Any suggestions? Thank you for your help
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Page title tag auto generated from Gallery problem

Post by calguy1000 »

try changing:

Code: Select all

{assign var='gallery_title' value=$gallerytitle}
to:

Code: Select all

{assign var='gallery_title' value=$gallerytitle scope=global}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Locked

Return to “Modules/Add-Ons”