Products module title to page title

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
pwg
Forum Members
Forum Members
Posts: 191
Joined: Tue Aug 01, 2006 1:48 am
Location: Sydney

Products module title to page title

Post by pwg »

I'm not sure why i'm having a problem with this, as I have it sorted in other modules, but in the Products module I can't seem to set the page title.

I have

Code: Select all

{assign var='alt_title' value=$entry->product_name->value}
towards the top of my Products detail template, and call the title via

Code: Select all

{if isset($alt_title)}
<title>{$alt_title} | {sitename}</title>
{else}
<title>{title} - {sitename}</title>
{/if}
in the Global metadata.

I tried printing the variables but no results. Which I assume means I'm doing something wrong, but wonder, what?

Variations work in news, CGBlog, and Company directory modules,

Wondering if there is anything obvious I'm missing?

Thanks for any help.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Products module title to page title

Post by Rolf »

Do you have in your template {content assign='content'} is the top of your template, and in the body content {$content} ?
This way the page/module content passes the Smarty engine and can be re-used

grtz. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
pwg
Forum Members
Forum Members
Posts: 191
Joined: Tue Aug 01, 2006 1:48 am
Location: Sydney

Re: Products module title to page title

Post by pwg »

Hi Rolf, thanks for the reply.

I was using {content assign='capturedcontent'} and {$capturedcontent}, however tried {content assign='content'} / {$content} and the way I do most of my templates, {content assign='main_content'} / {$main_content}, all to no avail.

Could it have something to do with {process_pagedata}?
I have tried with and without, to no success, but it seems I would need to process the page data prior to the head, to use an alt title?

Thanks again for any help - perhaps a small thing, but important for seo.

Cheers,

Paul
User avatar
iturbay
Forum Members
Forum Members
Posts: 85
Joined: Mon Sep 29, 2014 5:38 am

Re: Products module title to page title

Post by iturbay »

I have a similar problem with the modules cgblog and cgcalendar.
In the module companydirectory all good works. Have you found a solution?
pwg
Forum Members
Forum Members
Posts: 191
Joined: Tue Aug 01, 2006 1:48 am
Location: Sydney

Re: Products module title to page title

Post by pwg »

Hi iturbay,

Yes, have a look at: http://forum.cmsmadesimple.org/viewtopi ... =7&t=73344

Calguy was good enough to offer a solution and updating to 1.12.1 a more permanent fix.

Cheers,

Paul
User avatar
iturbay
Forum Members
Forum Members
Posts: 85
Joined: Mon Sep 29, 2014 5:38 am

Re: Products module title to page title

Post by iturbay »

Thank you so much! Now the problem is solved!
Post Reply

Return to “Modules/Add-Ons”