Project

General

Profile

Actions

Bug #17356

closed

TypoScript IF has no effect on HTML objects

Added by Christian Zehaczek almost 17 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2007-06-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)

Actions #1

Updated by Thorsten Kahler almost 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

Actions #2

Updated by Christian Zehaczek almost 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

Actions #3

Updated by Thorsten Kahler almost 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/

Actions #4

Updated by Thorsten Kahler almost 17 years ago

Would you please close the bugtracker entry?

Actions #5

Updated by Christian Kuhn about 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.

Actions #6

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF