for displaying news i´ve made different template layouts to choose for backend editors, configured in my theme´s PageTSconfig:
tx_news.templateLayouts {
10 = LLL:EXT:mytheme/Resources/Private/Language/locallang.xlf:news.layout.withoutDate
20 = LLL:EXT:mytheme/Resources/Private/Language/locallang.xlf:news.layout.highlightListView
30 = LLL:EXT:mytheme/Resources/Private/Language/locallang.xlf:news.layout.imageTeaserListView
}
In my fluid template i can switch conditions like
<f:switch expression="{settings.templateLayout}">
<f:case value="10">
... use layout 1
</f:case>
<f:case value="20">
... use layout 2
</f:case>
<f:case value="30">
... use layout 3
</f:case>
</f:switch>
Everything works very fine until here.
Now i want to embed javascript for only one of these template layouts. So i tried to include the js within a condition in typoscript, asking for the value in this templateLayout setting. Something like this:
[globalVar = GP:tx_news_pi1|settings|templateLayout=30]
page{
includeJSFooter {
test = EXT:mytheme/Resources/Public/JavaScript/news-test.js
}
}
[global]
But this condition does not work. So my question: What is wrong? And how can i manage this to work, to get the right value for the condition? I hope anyone can help, thanx in advance.