Die TYPO3 Mailingliste - nicht fragen: lesen!
This is a discussion on [TYPO3] Content condition within the typo3-english@lists.netfielders.de forums, part of the TYPO3-Mailinglists: ENGLISH category; Please help, I can't get this to work: I want the second option to be executed only if the $...
|
|||||||
| Registrieren | Hilfe | Benutzerliste | Kalender | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren |
|
#1
|
|||
|
|||
|
Please help, I can't get this to work:
I want the second option to be executed only if the $_GET var (faq) is set. It does rewrite the entire thing when I first load it, but it works when I go to mypage.com/?faq=100 Can anyone give me a hand??? Thank you temp.mainTemplate { subparts.entrada = CONTENT subparts.entrada { table = tt_content select.where = pid=21 select.andWhere = colPos=1 } subparts.containers = CONTENT subparts.containers { table = tt_content select { pidInList = this orderBy = sorting where = colPos=0 } renderObj = TEXT renderObj { field = header wrap = |<br> typolink.parameter.field = pid typolink.parameter.dataWrap = | typolink.additionalParams.insertData = 1 typolink.additionalParams = &faq={field:uid} typolink.no_cache = 1 if.isTrue.field=header } } subparts.containers > subparts.containers = CONTENT subparts.containers { table=tt_content select{ where = colPos=0 andWhere.insertData=1 andWhere=uid={GPvar:faq} andWhere.if.isTrue.data=GPvar:faq } } } page.10 < temp.mainTemplate _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#2
|
|||
|
|||
|
Hi Stefan,
What happens if you wrap the second bit in a condition like this: [globalVar=GP:faq=*] .... [end] I didn't test it, so I'm not sure if it'll work.. hope it does! Bas -----Original Message----- From: typo3-english-bounces (AT) lists (DOT) netfielders.de on behalf of stefan (AT) aichholzer (DOT) name Sent: Tue 8/19/2008 17:21 To: typo3-english (AT) lists (DOT) netfielders.de Subject: [TYPO3] Content condition Please help, I can't get this to work: I want the second option to be executed only if the $_GET var (faq) is set. It does rewrite the entire thing when I first load it, but it works when I go to mypage.com/?faq=100 Can anyone give me a hand??? Thank you temp.mainTemplate { subparts.entrada = CONTENT subparts.entrada { table = tt_content select.where = pid=21 select.andWhere = colPos=1 } subparts.containers = CONTENT subparts.containers { table = tt_content select { pidInList = this orderBy = sorting where = colPos=0 } renderObj = TEXT renderObj { field = header wrap = |<br> typolink.parameter.field = pid typolink.parameter.dataWrap = | typolink.additionalParams.insertData = 1 typolink.additionalParams = &faq={field:uid} typolink.no_cache = 1 if.isTrue.field=header } } subparts.containers > subparts.containers = CONTENT subparts.containers { table=tt_content select{ where = colPos=0 andWhere.insertData=1 andWhere=uid={GPvar:faq} andWhere.if.isTrue.data=GPvar:faq } } } page.10 < temp.mainTemplate _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#3
|
|||
|
|||
|
Does not work. I tried your option and this one as well:
[globalVar = isTrue.data=GPvar:faq] ... [end] None seems to work, it looks like it's not reading the condition or something. > Hi Stefan, > What happens if you wrap the second bit in a condition like this: > > [globalVar=GP:faq=*] > ... > [end] > > I didn't test it, so I'm not sure if it'll work.. hope it does! > > Bas > > -----Original Message----- > From: typo3-english-bounces (AT) lists (DOT) netfielders.de on behalf of > stefan (AT) aichholzer (DOT) name > Sent: Tue 8/19/2008 17:21 > To: typo3-english (AT) lists (DOT) netfielders.de > Subject: [TYPO3] Content condition > > Please help, I can't get this to work: > > I want the second option to be executed only if the $_GET var (faq) is > set. It does rewrite the entire thing when I first load it, but it works > when I go to mypage.com/?faq=100 > > Can anyone give me a hand??? > > Thank you > > > > temp.mainTemplate { > subparts.entrada = CONTENT > subparts.entrada { > table = tt_content > select.where = pid=21 > select.andWhere = colPos=1 > } > > > subparts.containers = CONTENT > subparts.containers { > table = tt_content > select { > pidInList = this > orderBy = sorting > where = colPos=0 > } > > renderObj = TEXT > renderObj { > field = header > wrap = |<br> > typolink.parameter.field = pid > typolink.parameter.dataWrap = | > typolink.additionalParams.insertData = 1 > typolink.additionalParams = &faq={field:uid} > typolink.no_cache = 1 > if.isTrue.field=header > } > } > > > subparts.containers > > subparts.containers = CONTENT > subparts.containers { > table=tt_content > select{ > where = colPos=0 > andWhere.insertData=1 > andWhere=uid={GPvar:faq} > andWhere.if.isTrue.data=GPvar:faq > } > } > > > } > > page.10 < temp.mainTemplate > > > > > _______________________________________________ > TYPO3-english mailing list > TYPO3-english (AT) lists (DOT) netfielders.de > http://lists.netfielders.de/cgi-bin/.../typo3-english > > _______________________________________________ > TYPO3-english mailing list > TYPO3-english (AT) lists (DOT) netfielders.de > http://lists.netfielders.de/cgi-bin/.../typo3-english _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#4
|
|||
|
|||
|
Hi Stefan,
I won't have time to actually test this until later today, but I suspect the * in the condition may be a bit much. If you're always expecting a number, maybe [globalVar=GP:faq>0] ...might work? That's assuming you're not using the condition inside {}'s. Interesting issue though. I'll do some testing later today. Bas -----Original Message----- From: typo3-english-bounces (AT) lists (DOT) netfielders.de [mailto:typo3-english-bounces (AT) lists (DOT) netfielders.de] On Behalf Of stefan (AT) aichholzer (DOT) name Sent: Wednesday, August 20, 2008 10:06 AM To: TYPO3 English Subject: Re: [TYPO3] Content condition Does not work. I tried your option and this one as well: [globalVar = isTrue.data=GPvar:faq] ... [end] None seems to work, it looks like it's not reading the condition or something. > Hi Stefan, > What happens if you wrap the second bit in a condition like this: > > [globalVar=GP:faq=*] > ... > [end] > > I didn't test it, so I'm not sure if it'll work.. hope it does! > > Bas > > -----Original Message----- > From: typo3-english-bounces (AT) lists (DOT) netfielders.de on behalf of > stefan (AT) aichholzer (DOT) name > Sent: Tue 8/19/2008 17:21 > To: typo3-english (AT) lists (DOT) netfielders.de > Subject: [TYPO3] Content condition > > Please help, I can't get this to work: > > I want the second option to be executed only if the $_GET var (faq) is > set. It does rewrite the entire thing when I first load it, but it works > when I go to mypage.com/?faq=100 > > Can anyone give me a hand??? > > Thank you > > > > temp.mainTemplate { > subparts.entrada = CONTENT > subparts.entrada { > table = tt_content > select.where = pid=21 > select.andWhere = colPos=1 > } > > > subparts.containers = CONTENT > subparts.containers { > table = tt_content > select { > pidInList = this > orderBy = sorting > where = colPos=0 > } > > renderObj = TEXT > renderObj { > field = header > wrap = |<br> > typolink.parameter.field = pid > typolink.parameter.dataWrap = | > typolink.additionalParams.insertData = 1 > typolink.additionalParams = &faq={field:uid} > typolink.no_cache = 1 > if.isTrue.field=header > } > } > > > subparts.containers > > subparts.containers = CONTENT > subparts.containers { > table=tt_content > select{ > where = colPos=0 > andWhere.insertData=1 > andWhere=uid={GPvar:faq} > andWhere.if.isTrue.data=GPvar:faq > } > } > > > } > > page.10 < temp.mainTemplate > > > > > _______________________________________________ > TYPO3-english mailing list > TYPO3-english (AT) lists (DOT) netfielders.de > http://lists.netfielders.de/cgi-bin/.../typo3-english > > _______________________________________________ > TYPO3-english mailing list > TYPO3-english (AT) lists (DOT) netfielders.de > http://lists.netfielders.de/cgi-bin/.../typo3-english _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#5
|
|||
|
|||
|
Ok, it works now:
[globalVar=GP:faq > 0] page.10.subparts.containers > page.10.subparts.containers = CONTENT page.10.subparts.containers { table=tt_content select{ where = colPos=0 andWhere.insertData=1 andWhere=uid={GPvar:faq} andWhere.if.isTrue.data=GPvar:faq } } [end] it had to be placed on the end of the TS setup, below: page.10 < temp.mainTemplate Besides I was using [globalVar=GPVar:faq > 0] instead of [globalVar=GP:faq > 0] that didn't help either. Thank you very much!!! > Hi Stefan, > I won't have time to actually test this until later today, but I suspect > the * in the condition may be a bit much. If you're always expecting a > number, maybe > > [globalVar=GP:faq>0] > > ..might work? > > That's assuming you're not using the condition inside {}'s. Interesting > issue though. I'll do some testing later today. > > Bas > > -----Original Message----- > From: typo3-english-bounces (AT) lists (DOT) netfielders.de > [mailto:typo3-english-bounces (AT) lists (DOT) netfielders.de] On Behalf Of > stefan (AT) aichholzer (DOT) name > Sent: Wednesday, August 20, 2008 10:06 AM > To: TYPO3 English > Subject: Re: [TYPO3] Content condition > > > Does not work. I tried your option and this one as well: > > [globalVar = isTrue.data=GPvar:faq] > ... > [end] > > None seems to work, it looks like it's not reading the condition or > something. > > >> Hi Stefan, >> What happens if you wrap the second bit in a condition like this: >> >> [globalVar=GP:faq=*] >> ... >> [end] >> >> I didn't test it, so I'm not sure if it'll work.. hope it does! >> >> Bas >> >> -----Original Message----- >> From: typo3-english-bounces (AT) lists (DOT) netfielders.de on behalf of >> stefan (AT) aichholzer (DOT) name >> Sent: Tue 8/19/2008 17:21 >> To: typo3-english (AT) lists (DOT) netfielders.de >> Subject: [TYPO3] Content condition >> >> Please help, I can't get this to work: >> >> I want the second option to be executed only if the $_GET var (faq) is >> set. It does rewrite the entire thing when I first load it, but it > works >> when I go to mypage.com/?faq=100 >> >> Can anyone give me a hand??? >> >> Thank you >> >> >> >> temp.mainTemplate { >> subparts.entrada = CONTENT >> subparts.entrada { >> table = tt_content >> select.where = pid=21 >> select.andWhere = colPos=1 >> } >> >> >> subparts.containers = CONTENT >> subparts.containers { >> table = tt_content >> select { >> pidInList = this >> orderBy = sorting >> where = colPos=0 >> } >> >> renderObj = TEXT >> renderObj { >> field = header >> wrap = |<br> >> typolink.parameter.field = pid >> typolink.parameter.dataWrap = | >> typolink.additionalParams.insertData = 1 >> typolink.additionalParams = &faq={field:uid} >> typolink.no_cache = 1 >> if.isTrue.field=header >> } >> } >> >> >> subparts.containers > >> subparts.containers = CONTENT >> subparts.containers { >> table=tt_content >> select{ >> where = colPos=0 >> andWhere.insertData=1 >> andWhere=uid={GPvar:faq} >> andWhere.if.isTrue.data=GPvar:faq >> } >> } >> >> >> } >> >> page.10 < temp.mainTemplate >> >> >> >> >> _______________________________________________ >> TYPO3-english mailing list >> TYPO3-english (AT) lists (DOT) netfielders.de >> http://lists.netfielders.de/cgi-bin/.../typo3-english >> >> _______________________________________________ >> TYPO3-english mailing list >> TYPO3-english (AT) lists (DOT) netfielders.de >> http://lists.netfielders.de/cgi-bin/.../typo3-english > > > _______________________________________________ > TYPO3-english mailing list > TYPO3-english (AT) lists (DOT) netfielders.de > http://lists.netfielders.de/cgi-bin/.../typo3-english > _______________________________________________ > TYPO3-english mailing list > TYPO3-english (AT) lists (DOT) netfielders.de > http://lists.netfielders.de/cgi-bin/.../typo3-english > > _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#6
|
|||
|
|||
|
Hi!
stefan (AT) aichholzer (DOT) name wrote: > Does not work. I tried your option and this one as well: > > [globalVar = isTrue.data=GPvar:faq] Do you see something like isTrue.data used in conditions if you read official documentation? It is not available there. Read the TSRef, it describes correct syntax. -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extens...velopment/book In the blog: http://typo3bloke.net/post-details/s...d_in_the_code/ _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#7
|
|||
|
|||
|
Dmitry,
Thank you for your answer, and with all respect, let me tell you that I went through the documentation more than once, and in my opinion it's just not well written and very hard to follow and understand, even by experienced developers. There's a significant lack of examples on how things are and should be done, if you take a look at the PHP docs, for example, you'll see what I mean by well written documentation and examples. Best regards. On Wed, 20 Aug 2008 12:27:43 +0300, "Dmitry Dulepov [typo3]" <dmitry (AT) typo3 (DOT) org> wrote: > Hi! > > stefan (AT) aichholzer (DOT) name wrote: >> Does not work. I tried your option and this one as well: >> >> [globalVar = isTrue.data=GPvar:faq] > > Do you see something like isTrue.data used in conditions if you read > official documentation? It is not available there. > > Read the TSRef, it describes correct syntax. > > -- > Dmitry Dulepov > TYPO3 Core team > My TYPO3 book: http://www.packtpub.com/typo3-extens...velopment/book > In the blog: > http://typo3bloke.net/post-details/s...d_in_the_code/ > _______________________________________________ > TYPO3-english mailing list > TYPO3-english (AT) lists (DOT) netfielders.de > http://lists.netfielders.de/cgi-bin/.../typo3-english _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#8
|
|||
|
|||
|
Hi!
stefan (AT) aichholzer (DOT) name wrote: > Thank you for your answer, and with all respect, let me tell you that I > went through the documentation more than once, and in my opinion it's just > not well written and very hard to follow and understand, even by > experienced developers. There's a significant lack of examples on how > things are and should be done, if you take a look at the PHP docs, for > example, you'll see what I mean by well written documentation and examples. The best thing is to use only what you see in docs. If you do not see isTrue for conditions, it means you cannot use isTrue for conditions. Docs are very complete. They may be not the easiest reading but they are complete. Some pending changes are also available on TYPO3 wiki. -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extens...velopment/book In the blog: http://typo3bloke.net/post-details/s...d_in_the_code/ _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#9
|
|||
|
|||
|
Hi Stefan,
Many of the examples on php.net are user contributed comments. Very useful, but not exactly the merit of the PHP project itself. But if all else fails.. become a Jedi and learn to use the source, young Padawan. ;-)) Bas On Wed, 2008-08-20 at 03:46 -0600, stefan (AT) aichholzer (DOT) name wrote: > Dmitry, > > Thank you for your answer, and with all respect, let me tell you that I > went through the documentation more than once, and in my opinion it's just > not well written and very hard to follow and understand, even by > experienced developers. There's a significant lack of examples on how > things are and should be done, if you take a look at the PHP docs, for > example, you'll see what I mean by well written documentation and examples. > > Best regards. > > > On Wed, 20 Aug 2008 12:27:43 +0300, "Dmitry Dulepov [typo3]" > <dmitry (AT) typo3 (DOT) org> wrote: > > Hi! > > > > stefan (AT) aichholzer (DOT) name wrote: > >> Does not work. I tried your option and this one as well: > >> > >> [globalVar = isTrue.data=GPvar:faq] > > > > Do you see something like isTrue.data used in conditions if you read > > official documentation? It is not available there. > > > > Read the TSRef, it describes correct syntax. > > > > -- > > Dmitry Dulepov > > TYPO3 Core team > > My TYPO3 book: http://www.packtpub.com/typo3-extens...velopment/book > > In the blog: > > > http://typo3bloke.net/post-details/s...d_in_the_code/ > > _______________________________________________ > > TYPO3-english mailing list > > TYPO3-english (AT) lists (DOT) netfielders.de > > http://lists.netfielders.de/cgi-bin/.../typo3-english > > _______________________________________________ > TYPO3-english mailing list > TYPO3-english (AT) lists (DOT) netfielders.de > http://lists.netfielders.de/cgi-bin/.../typo3-english _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#10
|
|||
|
|||
|
Hi!
Bas v.d. Wiel wrote: > Many of the examples on php.net are user contributed comments. Very > useful, but not exactly the merit of the PHP project itself. But if all > else fails.. become a Jedi and learn to use the source, young > Padawan. ;-)) He-he "The source" reminded me about "The Source" from the "The Charmed" series:http://en.wikipedia.org/wiki/The_Source_%28Charmed%29 Nice associations: Jedi + The Source ![]() -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extens...velopment/book In the blog: http://typo3bloke.net/post-details/s...d_in_the_code/ _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
| Themen-Optionen | Thema durchsuchen |
| Ansicht | Thema bewerten |
|
|
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [TYPO3-german] Probleme mit rgaccordion in templavoila - condition für templavoila content | Ralf-René Schröder | typo3-german@lists.netfielders.de | 1 | 28.01.2008 18:17 |
| [TYPO3-german] Probleme mit rgaccordion in templavoila - condition für templavoila content | Ralf-René Schröder | typo3-german@lists.netfielders.de | 0 | 26.01.2008 15:41 |
| [TYPO3-german] Probleme mit rgaccordion in templavoila - condition für templavoila content | Ralf-René Schröder | typo3-german@lists.netfielders.de | 0 | 26.01.2008 15:24 |
| [TYPO3-german] rgaccordion in templavoila - condition für templavoila content | Ralf-René Schröder | typo3-german@lists.netfielders.de | 0 | 26.01.2008 15:09 |
| [TYPO3] Condition for certain content element | Tapio Markula | typo3-english@lists.netfielders.de | 2 | 06.02.2007 23:00 |