[TYPO3-templavoila] conditions in DS

Klaus Fumy klaus.fumy at uni-ulm.de
Thu Jan 24 11:19:57 CET 2008


Marco Peemöller schrieb:
> Klaus Fumy schrieb:
>> Hello List,
>>
>> am I allowed to use a condition in the typoscript part of my DS.
>>
>> I am asking, because I want to show / hide Content Elements depending 
>> on  the IP.
>>
>> I tried the following, but didn´t succeed:
>>
> 
> Try this in your main TS-Setup:
> 
> [IP = 134.60.*.*] && [globalVar = TSFE:id = 134]
> lib.field_content = COA
> lib.field_content {
>     10 = RECORDS
>     10.source.current=1
>     10.tables = tt_content
>     10.wrap = <!--TYPO3SEARCH_begin--> | <!--TYPO3SEARCH_end-->
> }
> [Else]
> lib.field_content = COA
> lib.field_content {
>     10 = TEXT
>         10.value = You are not allowed to view the content
> }
> [global]
> 
> Then in your DS:
> 
> <TypoScript><![CDATA[
> 10 &lt; lib.field_content
> ]]></TypoScript>
> 
> regrads,
> 
> Marco

Thannks for your suggestion. But it doesn´t work. I tried to use
  <TypoScriptObjPath> and the  <eType>TypoScriptObject</eType>, without 
success. Thats a pitty.

Now I use the extensions cc_iplogin_fe and cc_ipauth. They do what I 
want, but with pure typoscript it would have been more elegant.

Cheers
klaus


More information about the TYPO3-project-templavoila mailing list