[TYPO3-templavoila] Conditionals in Data Structure

Ron Hall ron at busynoggin.com
Wed Sep 6 16:47:38 CEST 2006

Thank you for the response but I know how to get constants into my template.
That is not the problem.

My issue is with the use of conditionals. I can get them to work in ts
templates but not in typoscript in TV data structures.

I need insight on the use of {global_Var]  or the "if" conditional My
imaginary examples again are:

10 = TEXT
10.value = Include this text if condition is true
10.if {
    value = {$myConstant}
    equals = on

Or even better something like this:

10 = TEXT
10.value = Include this if condition IS NOT met
[globalVar = TSFE:page | uid = {$myConstant}]
10.value = Include this if condition IS met

My question is: Can conditionals be used within the ts in data structures?
If so, con someone give me a working example so I can compare my code and
figure out the problem.

I have done much searching on tv list, tv manual, futuristic template
building and google but have yet to see anything about using conditionals in
this setting.

Any insight is appreciated.

Thanks again,
Ron Hall

On 9/6/06 1:08 AM, "Dmitry Dulepov [typo3bloke.net]" <typo3 at accio.lv> wrote:

> Hi!
> Ron Hall wrote:
>> Anyone have any insight into this?
> Constants in DS must be accessed differently than in TS setup. This
> happens because TS in DS is a separate unit. Constants in main TS belong
> to that main TS.
> You need to let TV know which constants you want to use. You do it in
> the main template. There you have:
> page.10 = USER
> page.10.userFunc = tx_templavoila_pi1->main_page
> Add line there for each constant:
> page.10.TSconst.myconst = {$myconst}
> Notice that only one levelconstatnts cn be used this way. I.e. you
> cannot have "page.10.TSconst.myconst.myvalue" there.
> Btw, it is all in the manual.

More information about the TYPO3-project-templavoila mailing list