Page 1 of 1

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

Posted: Sun Aug 28, 2011 4:28 pm
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!

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

Posted: Sun Aug 28, 2011 5:54 pm
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}

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

Posted: Sun Aug 28, 2011 6:07 pm
by Cody
Thanks a lot! That is exactly what I need!