[TYPO3] wrap a COA using 'optionSplit'?

Tapio Markula tapio.markula at dnainternet.net
Wed Apr 19 21:29:44 CEST 2006


JoH wrote:

> OK - but the code you are wrapping around your header seems to be a bit 
> "oversized" if you just want a print link.

It should be always on the same row - not lower

> Here is a code that I would use to get the same result.
> 
> lib.stdheader = COA
> lib.stdheader {
>     stdWrap.dataWrap >
>     stdWrap.outerWrap.cObject = CASE
>     stdWrap.outerWrap.cObject {
>         key.field = colPos
>         default = COA
>         default {
>             10 = COA
>             10 {
>                 10 = TEXT
>                 10.value = |
>                 20 = IMAGE
>                 20 {
>                     file = 
> fileadmin/template/main/kuvat_catella/printer.gif
>                     wrap = <a href="javascript:window.print()">|</a></div>
>                 }
>                 stdWrap.if {
>                     value = 1
>                     equals.data = cObj:parentRecordNumber
>                 }
>                 stdWrap.dataWrap = <div class="csc-header 
> csc-header-n{cObj:parentRecordNumber}">|</div>
>             }
>             20 = TEXT
>             20 {
>                 value = |
>                 dataWrap = <div class="csc-header 
> csc-header-n{cObj:parentRecordNumber}">|</div>
>                 stdWrap.if {
>                     value = 1
>                     equals.data = cObj:parentRecordNumber
>                     negate = 1
>                 }
>             }
>         }
>         1 < .default.20
>         1.stdWrap.if >
>         2 < .1
>         3 < .1
>     }
> }

almost correct result
	<div class="csc-header csc-header-n1"><h1 
class="csc-firstHeader">Catellan sijoittajat ja omistajapohja</h1><a 
href="javascript:window.print()"><img 
src="fileadmin/template/main/kuvat_catella/printer.gif" alt="" title="" 
border="0" height="18" width="21"></a></div><div class="csc-header 
csc-header-n1">

I take off </div> after link

+ added table

<table style="margin: 0pt;" border="0" cellpadding="0" cellspacing="0" 
width="100%"><tbody><tr><td><div class="csc-header csc-header-n1"><h1 
class="csc-firstHeader">Catellan sijoittajat ja 
omistajapohja</h1></div></td><td><a 
href="javascript:window.print()"><img 
src="fileadmin/template/main/kuvat_catella/printer.gif" alt="" title="" 
border="0" height="18" width="21"></a></td></tr></tbody></table><div 
class="csc-header csc-header-n1">

object 20 creates however an additional div without termination.
That is the actual error in the code. Thank's anyway.



More information about the TYPO3-english mailing list