News title as page title

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
korisnik
New Member
New Member
Posts: 4
Joined: Sun Aug 25, 2013 11:47 am

News title as page title

Post by korisnik »

I created new page and added title for that page. Within that page I'm writing news. But when I open news details it show me page title not news title.

how to make it to show news title, not page title all the time
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: News title as page title

Post by velden »

alter your page template:

Code: Select all

{title assign='title'}
<__html>
  <head><title>{$title}</title></head>
This code initially assigns value of {title} to variabele $title. It needs to be placed above the <__html> opening tag.

then inside your News detail template:

Code: Select all

{assign var='title' value=$entry->title}
Or something like that. This code assigns a new value to $title.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: News title as page title

Post by Dr.CSS »

Look at calguy1000s 4th tip or so down...

http://forum.cmsmadesimple.org/viewtopi ... =4&t=11689
korisnik
New Member
New Member
Posts: 4
Joined: Sun Aug 25, 2013 11:47 am

Re: News title as page title

Post by korisnik »

thank you It helped me :D
Post Reply

Return to “CMSMS Core”