Page 1 of 1

[Solved] News title not Page title

Posted: Tue Nov 30, 2010 1:41 am
by oceanblue
Now, I know this should be easy and managed to do it in the old version of news, but I can't get the 'Title' of the news article to be the page 'Title'. It just shows up as the page that I use to show all news items!!??

Thanks and sorry for being dumb ::)

Re: News title not Page title

Posted: Tue Nov 30, 2010 2:28 am
by Wishbone
I don't know if there is an easier way in the newest versions of CMSMS, but in my template, where you normally see {title}, I put:

Code: Select all

{if isset($news_title)}
<title>{sitename} - {$news_title}</title>
{else}
<title>{sitename} - {title}</title>
{/if}
and in my news template, at the end I put:

Code: Select all

{assign var='news_title' value=$entry->title}
This last piece sets the value of an arbitrary variable called 'news_title', which we pick up when processing the

This only works when 'process_whole_template' is false (the default) in config.php. This allows the (where we figure out what the title is) to be processed before the .

Re: News title not Page title

Posted: Tue Nov 30, 2010 3:13 am
by oceanblue
Fantastic  8)
That worked a treat!!

On another note:
how can you get smarty tags processed in RSS feeds?
mine just come up in literal text
eg:

Code: Select all

{CGFeedMaker action='rsslink' feed='OBAnews'}

Re: News title not Page title

Posted: Tue Nov 30, 2010 3:42 am
by Wishbone
You might want to put your second question in it's own topic.

Re: [Solved] News title not Page title

Posted: Wed Dec 01, 2010 1:07 am
by oceanblue
Thanks for all the help.

In order to process the cms-selflinks changed feed template to this:

Code: Select all

{capture assign='description'}{eval var=$entry->summary}{eval var=$entry->content}{/capture}
Then changed url-rewrite to internal and everything looking good  :D