[TYPO3] pagetitle and tt_news

Dmitry Martynenko dima at realt.by
Fri May 30 18:25:36 CEST 2008


Hi Dieter,

DJ> Thanks! It allways used to work. Maybe tt_news update changed things? It
DJ> seems that substitutePagetitle is default allready on 1.

DJ> Now I have 1 more question, since I also let a H1 automatically generate
DJ> on each page :

DJ> lib.topheader = COA
DJ> lib.topheader {
DJ>         5 = TEXT
DJ>         5.value = <h1>
DJ>         10 = TEXT
DJ>         10.value = MyCompany:
DJ>         20 = TEXT
DJ>         20.value = &nbsp;{page:subtitle // page:title}
DJ>         20.insertData = 1
DJ>         25 = TEXT
DJ>         25.value = </h1>
DJ>         }

DJ> Here I want also the title of a tt_news article instead of the page 
DJ> where the single view is located.

There is no simple way to use something like substitutePagetitle for this.
Because it is hard coded PHP code for change page title in tt_news.

You can use something like TS RECORDS to load current tt_news record
by uid from GET params, fetch title from this and set the value like:
  20.value = &nbsp;{tt_news:title // page:subtitle // page:title}

I does not have finished code for this, but you can try to find similar code.

-- 
Dmitry Martynenko
Developer

Web: http://realt.by



More information about the TYPO3-english mailing list