[TYPO3] Rendering special way content elements

Tapio Markula tapio.markula at xetpoint.fi
Tue May 27 20:24:29 CEST 2008


peter at umloud.dk
> You can use the "numRows" property of stdWrap to check the number of
> records on the page.
> 
> Something like this:
> 
> page.610 = TEXT
> page.610.value = Only 1 Element on this page!
> page.610.if.value = 1
> page.610.if.equals.numRows {
> 	table = tt_content
> 	select.orderBy = sorting
> 	select.where = colPos=3
> 	select.languageField = sys_language_uid
> }
> 
> Since CONTENT objects doesn't have an "if" property, you'll need to
> enclose the CONTENT object in a COA. (The code below is untested)
> 
> styles.content.getBorder {
>    // ... Your code here ...
> 
>   # Render the last content element.
> 	20 = COA
> 	20 {
> 		if.value = 1
> 		if.negate = 1
> 		if.isLessThan.numRows {
> 			table = tt_content
> 			select.orderBy = sorting
> 			select.where = colPos=3
> 			select.languageField = sys_language_uid
> 	  }
>     20 < styles.content.getBorder.10
>     20.select.max >
>     20.select.begin = total-1
>     20.renderObj.stdWrap.wrap = |<img
> src="/fileadmin/template/main/kuvat/viiva268.gif" width="268px"
> height="4px" />
> 	}
> }

Well still the content element will be rendered twice.


More information about the TYPO3-english mailing list