[TYPO3-english] removeWrapping depending on colPos

Michael HüŸgelschŠaffer michael.huegelschaeffer at mehrwert.de
Fri Dec 10 08:21:12 CET 2010


Good morning,

> I'm struggling with the automatic wraps generated by TYPO3.
>
> I would like to alter the wrapping of text depending of the column the
> content is placed in.
>
> For instance:
> colPos = 0 => remove all tags
> colPos = 1 => standard wrap
>
> This works fine for the outerwrap:
>
> # remove standard datawrap of all text elements
> tt_content.text.20.dataWrap = |
>
> # add div to normal col, leave others blank
> tt_content.text.20.stdWrap.outerWrap = <div class="toggle">|</div>
> tt_content.text.20.stdWrap.outerWrap.if {
> equals.field = colPos
> value = 0
> }
>
> But the standard <p> wrap that TYPO3 produces for dubious reasons is not
> removed.
> So I tried to do the following:
>
> #remove wrapping for colPos 0
> tt_content.text.20.parseFunc.nonTypoTagStdWrap.encapsLines {
> removeWrapping = 1
> removeWrapping.if {
> equals.field = colPos
> value = 0
> }
> }
>
> But this doesn't work. It removes all tags independent of the colPos. So
> in other words the if statement is ignored.
>
> Does anybody know why? And why does the if statement only works in
> certain cases?
removeWrapping does not have if- or stdWrap-properties, that's why it 
won't work.

stdWrap properties can be used with e.g. nonTypoTagStdWrap or 
encapsLinesStdWrap. Look in TSref for detailed info.

Greetings Michael


More information about the TYPO3-english mailing list