[TYPO3] Content condition

stefan at aichholzer.name stefan at aichholzer.name
Wed Aug 20 10:19:19 CEST 2008


 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.netfielders.de
> [mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of
> stefan at aichholzer.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.netfielders.de on behalf of
>> stefan at aichholzer.name
>> Sent: Tue 8/19/2008 17:21
>> To: typo3-english at lists.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.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>>
>> _______________________________________________
>> TYPO3-english mailing list
>> TYPO3-english at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
>




More information about the TYPO3-english mailing list