CMSMadeSimple news title as page title

If you are working with CMSMS and you would like to show news title as page title I found a solution.
I had problem that when I created new page and wrote title for that page even when I opened any of my news I wrote it always showed that page title, not news title.

So if my Page title was: "This is page title". And I opened my news with title: "This is my news." It would show page title (between <title> tags) "This is page title | My Website".

This is summery of how to show News title instead of Page title:

Add the following to the end of your News detail template (it is under Content > News > tab Detail Templates):
{assign var='alt_title' value=$entry->title}

 Now edit your site template and replace:
{sitename} - {title} <title>{title} | {sitename}</title>

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

More on: CMSMS - Setting your page's title to be the News title - CMS Made Simple Tips, Tricks

Primjedbe

Popularni postovi s ovog bloga

Izrada stolarije Staklo Dom

How to - Asus BIOS Utility - Boot from USB