[TYPO3-ttnews] tt_news title as page title - multiple languages
adam harvie
adam.harvie at gmail.com
Tue Oct 5 18:01:09 CEST 2010
Hi all,
I've been wanting to set the page title of our single-news reader page
to the title of the tt_news item being displayed.
There are a number of places that suggest this solution using RECORDS:
lib.newstitle = RECORDS
lib.newstitle {
dontCheckPid = 1
tables = tt_news
source.data = GPvar:tx_ttnews|tt_news
conf.tt_news = TEXT
conf.tt_news.field = title
conf.tt_news.required = 1
}
Which works fine, but only in the default language - all other
language versions of the article display the default language's title.
I've been trying to figure out a solution using CONTENT, but I'm not
getting results. Here's the Typoscript setup I'm using:
[globalVar = TSFE:id = 108] #id of our single news page
lib.newstitle = CONTENT
lib.newstitle {
table = tt_news
select {
selectFields = title
pidInList = 45 #id of our main news list page with the tt_news records
andWhere.cObject = TEXT
andWhere.cObject {
data = GPvar:tx_ttnews|tt_news #tt_news ID from
wrap = uid=”|”
}
}
renderObj = TEXT
renderObj.field = title
}
temp.mainTemplate.subparts.PAGETITLE < lib.newstitle.renderObj
[global]
This just renders the normal page title from tt_content. If I try a
different field from the tt_news table, such as 'short', it comes up
blank. I've tried manually entering a tt_news uid in the select, but
it still doesn't seem to find anything. Can anyone give me some advice
on this?
Thanks,
Adam
--
Adam Harvie
www.emergentbehaviour.org
e: adam.harvie at gmail.com
t: +1 514 271 9563
More information about the TYPO3-project-tt-news
mailing list