[TYPO3-english] Wrapping content elements in different ways
JoH asenau
info at cybercraft.de
Tue May 26 09:33:27 CEST 2009
> I tried by adapting some examples from those pages, but haven't find
> the definitive solution yet. My last attempt was as follows:
>
> temp.focus=COA
> temp.focus {
> 10 < styles.content.getRight
> 10 {
> renderObj = COA
> renderObj {
> wrap = |###SPLITTER###
> }
> }
>
> stdWrap.split {
> token = ###SPLITTER###
> cObjNum = 1|*||*|2||3
> 1.current = 1
> 1.wrap=<div class="element">|</div>
> 2.current = 1
> 2.wrap = <div class="last_element">|</div>
> 3.current = 1
> }
> }
>
> Now I get the blocks wrapped as expected, but they are empty:
Of course they are, since you replaced the renderObj with something
different :-)
> so the simplest solution is
> 10 < styles.content.getRight
> Handling them through CONTENT would be rather hard.
styles.content.getRight already gives you - guess what - a CONTENT cObject
:-)
It contains a renderObj which uses the setup of tt_content to render the
elements within a CASE.
To make sure it does what you want, you could do the following:
temp.focus=COA
temp.focus {
10 < styles.content.getRight
10 {
renderObj >
renderObj < tt_content
renderObj.stdWrap.outerWrap = |###SPLITTER###
}
stdWrap.split {
token = ###SPLITTER###
cObjNum = 1|*||*|2||3
1.current = 1
1.wrap=<div class="element">|</div>
2.current = 1
2.wrap = <div class="last_element">|</div>
3.current = 1
}
}
HTH
Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Twitter: http://twitter.com/bunnyfield
Xing: http://contact.cybercraft.de
T3 cookbook (2nd edition): http://www.4any1.de
TYPO3 Schulung: http://workshops.eqony.com
More information about the TYPO3-english
mailing list