|
|||||||
| Registrieren | Hilfe | Benutzerliste | Kalender | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren |
|
#1
|
|||
|
|||
|
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> } } } _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#2
|
|||
|
|||
|
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 (DOT) info> wrote in message news:mailman.1.1191939553.26814.typo3-english (AT) lists (DOT) 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> > } > } > } _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#3
|
|||
|
|||
|
Hi Peter,
Thanks for your reply. But it still doesn't work, the page just get an empty title tag if tx_awanthrcompanies_pi1[company_id] is not set Best regards, Lukas Peter Klein skrev: > 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 (DOT) info> wrote in message > news:mailman.1.1191939553.26814.typo3-english (AT) lists (DOT) 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> >> } >> } >> } > > _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#4
|
|||
|
|||
|
>> Hi Lukas.
>> Try changing your "2" object to this: >> >> 2 = TEXT >> 2 { >> if.isTrue.numRows >> if.negate = 1 >> value = <title>AI: Verksamheter</title> >> } >> > > Thanks for your reply. But it still doesn't work, the page just get an > empty title tag if tx_awanthrcompanies_pi1[company_id] is not set Of course, since there is nothing to count for numRows. You need at least a simple select statement to get any output from numRows to isTrue. Check the TSref for numRows and select to find out how it should be done. HTH Joey _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | Thema bewerten |
|
|
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [TYPO3-templavoila] no content displayed in a content element | lee perry | typo3-project-templavoila@lists.netfielders.de | 3 | 18.09.2007 08:59 |
| [TYPO3-templavoila] Data structure selector content missing inflexible content element | Hans van Dijk | typo3-project-templavoila@lists.netfielders.de | 5 | 06.06.2007 08:44 |
| Re: [TYPO3] if.isTrue AND if.isTrue | Florian Seirer | typo3-english@lists.netfielders.de | 2 | 09.05.2007 11:31 |
| [TYPO3] assign a content element to the end of a content area | Jamie Lawrence Jenner | typo3-english@lists.netfielders.de | 4 | 30.01.2007 17:02 |
| [TYPO3-german] Probleme beim wrappen des renderObj | Zueckert | expeer GmbH | typo3-german@lists.netfielders.de | 2 | 18.01.2007 16:03 |