[TYPO3-english] SB portfolio - Change template on condition

Jogvan Olsen jo at atlanticvideo.dk
Mon Sep 19 12:39:02 CEST 2011


Hi List

I am using SB_portfolio, and need to use 2 different templates for 
SingelDislay, depending on the field 'youtube'.

I need to test if the if the field 'youtube' contain data - this test is 
my problem.

I need something like this:
If the portfolio item contains a video (the field 'youtube' contains 
data) use the video template else use the non-video template.


I have tried with 'if.isTrue' and [globalVar..], but can't get it to work.


I thought this should work - but it doesn't.

plugin.tx_sbportfolio_pi1 {
   templateFile =  non-video.html
}

[globalVar = TSFE:tx_sbportfolio_items|youtube > 0]
plugin.tx_sbportfolio_pi1 {
   templateFile = video.html
}
[END]



Can anybody help me to get this to work?


Thanks in advance
Jógvan Olsen


More information about the TYPO3-english mailing list