[TYPO3] Title taken from the record name

Bartosz Aninowski bartoszx at SPAMgmail.com
Thu Jun 12 19:06:16 CEST 2008


> I have a site that displays a list of records.
> When I enter the single-view of the item I would like to have the name 
> of this item to be the title of entire page - how to achieve it?

Three approach:
1. if single view is cached (USER) use $GLOBALS['TSFE']->page['title'] = 
  'some text' (check tt_news ext)

2. if single view is not cached (USER_INT) you can use combination of 
user and user_int, COA_INT inside your extension
http://typo3.toaster-schwerin.de/typo3_dev/2006_09/msg00208.html

3. if single view is not cached (USER INT) you can use TS, example:


TEMP_PAGE_TITLE >
TEMP_PAGE_TITLE = CONTENT
TEMP_PAGE_TITLE {
table = tx_yourtable
select {
  pidInList = X
selectFields = title
#get uid of single record
andWhere.data = GPvar:uid
andWhere.wrap = uid=|
}

renderObj = COA
   renderObj {
     10 = TEXT
     10{
       field = tytul
       wrap = |
     }

}
}

config.noPageTitle = 2
# declare a page header text object
page.headerData.3.wrap = <title>My page: |</title>
page.headerData.3 < TEMP_PAGE_TITLE







> 
> Is it possible to put in meta keywords the content of some field of that 
>  record? Is there any ext doing this or do you know any suitable TYPO3 
> hints?


I think that above hints show you right direction how to achieve this.


More information about the TYPO3-english mailing list