[TYPO3-english] wrap div around 2 content elements
Muriel le Pair
typo3 at strangefruit.nl
Wed Dec 7 13:01:59 CET 2011
Hi,
I need a text with media element, only that does not exist.
Therefor I am trying to enclose two elements with one div.
<div id="test1">
text element
media element
</div>
I tried to solve it like this
(so the text text element prints they first part: outerWrap = <div
id="test1"> |, and the div is close by the media element):
tt_content {
text {
20 {
# remove standard datawrap of all text elements
dataWrap = |
stdWrap {
# add div to normal col, leave others blank
outerWrap = <div id="test1"> |
outerWrap.if {
equals.field = colPos
value = 0
}
removeBadHTML = 0
}
}
}
media {
20 {
stdWrap {
# add div to normal col, leave others blank
outerWrap = |</div>
outerWrap.if {
equals.field = colPos
value = 0
}
}
}
}
}
Nice try, but it doesn't work. TYPO3 automatically closes the first div
(text element) in the outerWrap, and leaves the second one (media
element) untouched.
So the result is:
<div id="test1"><p class="bodytext"></p></div></div>
Does anybody know how to disable the automatic "correction" of the
outerWrap html? Or a way to wrap 2 different content elements with one div?
--
kind regards,
Muriel le Pair
More information about the TYPO3-english
mailing list