[TYPO3] Setting page title from record information (like tt_news singleview)

tkoopa at gmail.com tkoopa at gmail.com
Tue Sep 11 15:56:47 CEST 2007


Thanks Oliver, I made a couple of changes but that's what I was
looking for. Here is the final code for those that are looking to do
something similar

config.noPageTitle = 2

page.headerData.3 >
page.headerData.3 =  COA
page.headerData.3.1 = RECORDS
page.headerData.3.1 {
        dontCheckPid = 1
        source.data = GPvar:tx_pixmeps_pi3|showUid
        tables = tx_pixmeps_table
        conf.tx_pixmeps_table >
        conf.tx_pixmeps_table = TEXT
        conf.tx_pixmeps_table.field = lastname
        conf.tx_pixmeps_table.htmlSpecialChars = 1
}
page.headerData.3.2 = TEXT
page.headerData.3.2.value =  
page.headerData.3.3 = RECORDS
page.headerData.3.3 {
        dontCheckPid = 1
        source.data = GPvar:tx_pixmeps_pi3|showUid
        tables = tx_pixmeps_table
        conf.tx_pixmeps_table >
        conf.tx_pixmeps_table = TEXT
        conf.tx_pixmeps_table.field = firstname
        conf.tx_pixmeps_table.htmlSpecialChars = 1
}

page.headerData.3.wrap = <title>Member : | </title>

On 9/8/07, Oliver Rowlands <oliver at liquidlight.co.uk> wrote:
> 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:&nbsp;|</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:&nbsp;|</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
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>


More information about the TYPO3-english mailing list