[TYPO3] Change the title of a page from TS

Jérémy Lecour jeremy.lecour at gmail.com
Wed Jan 25 09:00:09 CET 2006


GREAT !

Thank you very much Ernesto, it's working perfectly (as I can see with
a couple of different news displayed).

A big Thanks to Dmitry also who spent some precious time to understand
my poor explanations and to find a solution.

2006/1/25, Ernesto Baschny [cron IT] <ernst at cron-it.de>:
> On 23.01.2006 17:43, Jérémy Lecour wrote:
>
> > I use tt_news to manage my news. I also use a 'single_news' page to
> > display any news in the SINGLE mode.
> >
> > My TS code for the title :
> > lib.titre_page = TEXT
> > lib.titre_page {
> >       data = page:title
> > }
> >
> > It works very fine for all pages. But for my SINGLE page, I'd like to
> > have my news page instead of my page real title (it is "Single news"
> > and is not very pleasant ;-) )
> >
> > I've found in the php code of tt_news that it's making a dynamic title
> > substitution with that code :
> >
> > // set the title of the single view page to the title of the news record
> >       if ($this->conf['substitutePagetitle']) {
> >    $GLOBALS['TSFE']->page['title'] = $row['title'];
> >    // set pagetitle for indexed search to news title
> >    $GLOBALS['TSFE']->indexedDocTitle = $row['title'];
> >       }
> >
> > I'd like to do the same with TS in a template record of in TSconfig of my page.
>
> You can try to make your lib-Object of type COA_INT. This way, it will
> be post-poned until after all other scripts on that page have been
> called and you can probably access the data = page:title. But this will
> probably just work if the page isn't being cached, because if it is,
> tt_news won't get called again, thus won't set the page:title. Something
> like:
>
> lib.titre_page = COA_INT
> lib.titre_page {
>         10 = TEXT
>         10.data = page:title
> }
>
> If that doesn't work, you will have to use some more complex solution to
> fetch the title on your own from the tt_news table, like Dmitry suggests.
>
>
> Cheers,
> Ernesto
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>


--
Jérémy Lecour : <mailto:jeremy.lecour at gmail.com>
webdesigner, webmaster et développeur web
Trésorier du PLUG : Provence Linux User Group
http://www.plugfr.org/



More information about the TYPO3-english mailing list