[TYPO3] CONTENT, renderObj and isTrue
Peter Klein
peter at umloud.dk
Tue Oct 9 18:05:30 CEST 2007
Hi Lukas.
Try changing your "2" object to this:
2 = TEXT
2 {
if.isTrue.numRows
if.negate = 1
value = <title>AI: Verksamheter</title>
}
--
Peter Klein / Umloud Untd
"Lukas Mattsson" <lukas at antroposofi.info> wrote in message
news:mailman.1.1191939553.26814.typo3-english at lists.netfielders.de...
>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