[TYPO3] ifNotEmpty

Sacha Vorbeck Vorbeck at moduleBox.com
Wed Apr 2 10:27:57 CEST 2008


Hello Jan,

> moreover, I'd like to substitue left content with border, if left is empty:
> 
> page.10.subparts.CLEFT < styles.content.getLeft
> page.10.subparts.CLEFT {
> stdWrap.required = 1
> stdWrap.wrap = <div class="padding">|</div>
> stdWrap.ifEmpty.override.cObject < styles.content.getBorder
> stdWrap.ifEmpty.override.cObject.slide = -1
> stdWrap.ifEmpty.override.cObject.wrap = |
> }

I don`t like override, I think you get a clearer structurer with COAs:

page = PAGE
page {
	10 = COA
	10 {
		10 < styles.content.get
		10.stdWrap {
			wrap = <div class="padding">|</div>
			if.isTrue.numRows < styles.content.get
		}
		20 < styles.content.getRight
		20.stdWrap {
			wrap = nothing|nothing
			if.isFalse.numRows < styles.content.get
		}
	}
}

-- 
all the best,
Sacha

This golden age of communication
Means everyone talks at the same time


More information about the TYPO3-english mailing list