Setting page's title to be the News title

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
montedavis
Forum Members
Forum Members
Posts: 64
Joined: Wed Jul 03, 2013 7:44 pm

Setting page's title to be the News title

Post by montedavis »

Hello, I know that this topic has been asked before and I've been successful using the following in 1.11 CMSMS but I'm trying to get the news titles to show as the page titles in CMSMS 2.0 and I cannot get it to work.

in my news detail template
{assign var='alt_title' value=$entry->title}

and in my site template:

{if isset($alt_title)}
<title>{sitename} - {$alt_title}</title>
{else}
<title>{sitename} - {title}</title>
{/if}

Any help would be appreciated.

Thank you,

Monte
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Setting page's title to be the News title

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
montedavis
Forum Members
Forum Members
Posts: 64
Joined: Wed Jul 03, 2013 7:44 pm

Re: Setting page's title to be the News title

Post by montedavis »

Thank you Rolf! This solved my issue.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Setting page's title to be the News title

Post by velden »

Consider buying him a cup of coffee ;D
User avatar
angelpeace
Forum Members
Forum Members
Posts: 39
Joined: Fri May 15, 2009 9:45 am

Re: Setting page's title to be the News title

Post by angelpeace »

{assign var='alt_title' value=$entry->title scope='global'}
Post Reply

Return to “Modules/Add-Ons”