[TYPO3] Setting page title from record information (like tt_news singleview)
Oliver Rowlands
oliver at liquidlight.co.uk
Sat Sep 8 15:09:04 CEST 2007
Hi Tiberius,
Try using the RECORDS content object instead:
page.headerData {
3 >
3 {
preCObject = RECORDS
preCObject {
dontCheckPid = 1
tables = tx_pixmeps_table
source.data = GPvar:tx_pixmeps_pi3|showUid
conf {
tx_pixmeps_table = TEXT
tx_pixmeps_table {
field = lastname
htmlSpecialChars = 1
}
}
wrap = <title>My website: |</title>
}
}
}
Hope this help,
Oliver
tKoopa wrote:
> Hi all,
>
> I'm trying to set the page title from a plugin (like tt_news does on
> singleviews). I've tried:
>
> $GLOBALS['TSFE']->page['title'] = $row['lastname'];
> $GLOBALS['TSFE']->indexedDocTitle = $row['lastname'];
>
> but apparently this doesn't work because my plugin is cached (needs to be)
>
> So I looked at doing in TS, and I'm almost there but I can't retrieve
> the DB record information dynamically
>
> page.headerData.3 >
> page.headerData.3 = TEXT
> # This works when setting the record id statically
> #page.headerData.3.data = DB : tx_pixmeps_table:10:lastname
> #but not using the get var
> page.headerData.3.data = DB :
> tx_pixmeps_table:{GPvar:tx_pixmeps_pi3|showUid}:lastname
> page.headerData.3.wrap = <title>My website: |</title>
>
> Any pointer would be great,
>
> Thanks,
>
> Tiberius
--
Oliver Rowlands
:: Liquid Light ::
E - oliver at liquidlight.co.uk
W - http://www.liquidlight.co.uk
T - 00 44 (0)845 6 58 88 35
F - 00 44 (0)845 6 58 44 35
More information about the TYPO3-english
mailing list