Bug #17356
closedTypoScript IF has no effect on HTML objects
0%
Description
Hi all,
please see the following TS examples:
10 = HTML
10.value = Some Content...
10.if.value = odd
10.if.equals = even
Does not work: The HTML is rendered!
10 = TEXT
10.value = Some Content...
10.if.value = odd
10.if.equals = even
This works: The TEXT is NOT rendered.
10 = COA
10.10 = HTML
10.10.value = Some Content...
10.if.value = odd
10.if.equals = even
This works again, because the whole COA fails the if. The HTML is NOT rendered.
I am sure that the first one should also work, right?
- Christian
(issue imported from #M5738)
Updated by Thorsten Kahler over 17 years ago
Hi Christian,
please reaed TSRef carefully. There's a difference between HTML and TEXT!
This does work:
10 = HTML
10.value = Some Content...
10.value.if.value = odd
10.value.if.equals = even
Updated by Christian Zehaczek over 17 years ago
Hi,
can't count anymore how often i read the ref :)
"But the stdWrap is on the very rootlevel of the object. This is non-standard."
I noticed that, but... this does not explain why my example works on COA as well, there is no such "rootlevel stdWrap" (or the ref is outdated). Any Idea?
And what is with objects without a "value" property? eg. FILE
10 = FILE
10.file = /var/www/somefolder/somefile.html
10.if.value = odd
10.if.equals = even
Do i need to apply the if to "file" then instead? This may result in a garbled FILE object without a file property in the hope that TYPO3 then does'nt do anything. But further properties such as wraps or spaceBefore etc. may still be rendered then.
So this may be a conceptional question but for my side it surely makes sense to allow if's on all toplevel objects directly. Kicking any of their properties out in the hope nothing happens is a bad way.
- Christian
Updated by Thorsten Kahler over 17 years ago
COA has an explicit "if" option (and a stdWrap option that offers the whole stdWrap functionality).
See:
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/8/4/
Updated by Thorsten Kahler over 17 years ago
Would you please close the bugtracker entry?
Updated by Christian Kuhn over 15 years ago
Resolved, no change required. This is not a bug but documented behavior.
Please open a new issue type: feature if you think this should be changed.