[solved] different title on homepage and rest of the website

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.
Locked
Cody

[solved] different title on homepage and rest of the website

Post by Cody »

Hi,

I tryied search on this website, but didnt find answer, so I hope you can help me.

Just now i have title like this, for all pages:

Code: Select all

<title>{sitename} | {title}</title>
I want to know what I have to write in template to have:

Only on homepage:

Code: Select all

<title>{sitename}</title>
On the other pages

Code: Select all

<title>{title} | {sitename}</title>
I know that it will be some simple condition, but I am not very strong on smarty and cobstructing coniditions, can you help me please?

Thanks a lot!
uniqu3

Re: How to: different title on homepage and rest of the webs

Post by uniqu3 »

Ih alias of page is not equal to "alias-of-your-home-page" show title:

Code: Select all

{if $page_alias != 'alias-of-your-home-page'}{title} - {/if}{sitename}
Or with content id in case you might change your alias someday (as example if home would have id 21, you can see id when hovering over page title in list content page)

Code: Select all

{if $content_id != '21'}{title} - {/if}{sitename}
Cody

Re: How to: different title on homepage and rest of the webs

Post by Cody »

Thanks a lot! That is exactly what I need!
Locked

Return to “CMSMS Core”