[TYPO3] if... else in typo script for forceTypeValue, target and ATagParams in menu

stem stema at web.de
Wed Mar 8 22:12:01 CET 2006


Thanks for your help.
unfortunately, the qoute is interpreted and output as ". thus, this 
trick doesn't work.

it's a pity...

is there an other way, maybe?

thanks a lot!

s.

JoH wrote:
>> after your great help i've already got the wrapping depending on the
>> title of a menu item running...
>>
>> since this is possible i'm wondering, if one could also realize to set
>> forceTypeValue, target and ATagParams depending on the title of a menu
>> item...
>>
>> it should be something like this:
>> forceTypeValue = 1
>> forceTypeValue.if {
>>        value = M,I,A,N,?
>>        isInList.field = title
>>     }
>> NO.ATagParams = onClick="fenster(this.href,500,500); return false;"
>> NO.ATagParams.if {
>>        value = M,I,A,N,?
>>        isInList.field = title
>>     }
>>
>> i think it's quite tricky. it would be great to get some help :)
> 
> It doesn't make sense to change forceTypeValue this way since it is part of
> TMENU but not of TMENUITEM.
> Thus it would change based on the values of the current page and not on
> those of the menuitem.
> Since forceTypeValue hasn't got stdWrap properties it won't work anyway.
> 
> onClick could be realised with a trick. Use ATagTitle instead, since this
> Parameter has got stdWrap properties.
> Fill in title _and_ onClick there.
> 
> NO {
>     ATagTitle.cObject = COA
>     ATagTitle.cObject {
>         10 = TEXT
>         10.field = title
>         20 = TEXT
>         20.value = " onClick="fenster(this.href,500,500); return false
>         20.if {
>             value = M,I,A,N,?
>             isInList.field = title
>         }
>     }
> }
> 
> With the first quote you close the opening quote inserted by ATagTitle.
> Then you open another parameter with onClick=" that will be closed again by
> ATagTitle.
> 
> And since you are already using JavaScript to open the URL you could simply
> add &type=1 inside your opening script.
> 
> HTH
> 
> Joey
> 



More information about the TYPO3-english mailing list