[TYPO3-english] globalVar Condition problem

Peter Russ peter.russ at 4many.net
Wed May 6 11:12:55 CEST 2009


--- Original Nachricht ---
Absender:   Walrick
Datum:       06.05.2009 10:43:
> Sorry about bumping this, but doesn't anybody have an solution for this?
> 
> Walrick
> 
> Walrick wrote:
>> Hello,
>>
>> I'm using the following condition to do something:
>>
>> [globalVar = TSFE:page|fe_group = -2,TSFE:page|fe_group = 1] &&
>> [usergroup = 1,2]
>>
>> However I would like the condition also to apply if the fe_group field
>> of the page record contains 1,2 or 2,1.
>>
>> (In other words in any case where usergroup 1 has access to a page.)
>>
>> However as "," is used to separate the variables, just using
>> TSFE:page|fe_group =  1,2. doesn't work.
>>
>> Is there a way to solve this?
>>
>> Thanks for any help.
>>
>> Regards,
>>
>> Walrick
>>
> 
> 

Ever tried conditions in constants?

CONSTANTS:

allowedAccess=0
[usergroup=1,2]
allowedAccess = 1
[end]

restrictedPage=0
[globalVar = TSFE:page|fe_group = -2,TSFE:page|fe_group = 1] ||
[globalVar = TSFE:page|fe_group = -2,TSFE:page|fe_group = 2]
restrictedPage = 1
[end]

SETUP:

[globalVar = LIT:1 = {$allowedAccess}] &&
[globalVar = LIT:1 = {$restrictedPage}]
#do what ever is required
[end]

Not tested but should work.

Peter.



-- 
Fiat lux! Docendo discimus.
_____________________________
uon GbR

http://www.uon.li
http://www.xing.com/profile/Peter_Russ


More information about the TYPO3-english mailing list