Page 1 of 1

Setting page's title to be the News title

Posted: Wed Aug 03, 2016 11:58 pm
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

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

Posted: Thu Aug 04, 2016 6:02 am
by Rolf

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

Posted: Thu Aug 04, 2016 11:01 am
by montedavis
Thank you Rolf! This solved my issue.

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

Posted: Thu Aug 04, 2016 2:11 pm
by velden
Consider buying him a cup of coffee ;D

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

Posted: Mon Aug 08, 2016 7:08 am
by angelpeace
{assign var='alt_title' value=$entry->title scope='global'}