[TYPO3] CONTENT, renderObj and isTrue
Lukas Mattsson
lukas at antroposofi.info
Tue Oct 9 16:19:13 CEST 2007
I have a page that either display a list of companies, or a single
company. If a single company is displayed, the url contains the get
variable tx_awanthrcompanies_pi1[company_id].
If the variable is set, the page title should be injected with the
company name from the database table 'tx_awanthrcompanies_companies'
(works fine), or else be set to the default value '<title>AI:
Verksamheter</title>' (does not work).
I'm not sure exactly how the isTrue stuff works, here's my typoscript:
config.noPageTitle = 2
page.headerData.5 = CONTENT
page.headerData.5 {
table = tx_awanthrcompanies_companies
select {
orderBy = tstamp DESC
max = 1
pidInList = 234
where = deleted = 0
andWhere.data = GPvar:tx_awanthrcompanies_pi1 | company_id
andWhere.wrap = uid = |
}
renderObj = COA
renderObj {
1 = TEXT
1 {
if.isTrue.numRows
field = company_name
wrap = <title>| - AI: Verksamheter</title>
}
2 = TEXT
2 {
if.isTrue.ifEmpty.numRows
value = <title>AI: Verksamheter</title>
}
}
}
More information about the TYPO3-english
mailing list