Page 1 of 1

Setting page's title to be the News title

Posted: Wed Sep 07, 2011 2:04 pm
by gianpiero
Hi all

I've just upgraded to 1.9.4.3 "Faanui"

I would like to manage my self into the modification as in Subject.
I know that the trick has been already discussed and developed.

I reached 2 suggestion as follow:

by Calguy
Showing Article Title in the Page Title
http://wiki.cmsmadesimple.org/index.php ... /Templates

by Goran
Setting your page's title to be the News title
http://www.i-do-this.com/blog/29/Settin ... News-title

Is there any big difference between two ways to do this ?

Any suggestion about ? Any tested ?

Thanks in advance for any reply

Gianpiero (Ita)

Re: Setting page's title to be the News title

Posted: Wed Sep 07, 2011 4:01 pm
by Wishbone
gianpiero wrote:Showing Article Title in the Page Title
http://wiki.cmsmadesimple.org/index.php ... /Templates
The above is an older way to achieve this, though still perfectly valid. Previously, the template was processed in sequence, requiring that you capture the {content} in the <head>, so that the page title is known before <title> was used.
gianpiero wrote:Setting your page's title to be the News title
http://www.i-do-this.com/blog/29/Settin ... News-title
The above is the more modern way to do it. In the last several major versions, by default, the </__body> is processed before the <head>, so that titles set in the news detail template are available when the <head> is generated.

Re: Setting page's title to be the News title

Posted: Wed Sep 07, 2011 4:07 pm
by gianpiero
Thank for your reply. :)
Asap I'll make the second mod
I'll giving feeback later

Bye
Gianpiero

Re: Setting page's title to be the News title

Posted: Thu Sep 08, 2011 1:14 pm
by gianpiero
Sorry for buddy question:
this mod changes only the title on Browser Tab ?
The title of page, CMSMS field "Title" that appears into the template, is changed also ? ???

Thanks
Gianpiero

Re: Setting page's title to be the News title

Posted: Thu Sep 08, 2011 4:54 pm
by Wishbone
I usually output the title in the News detail template, using:
<h1>{$entry->title}</h1>