[TYPO3] Different wrap for last content in content area
Tapio Markula
tapio.markula at xetpoint.fi
Thu Oct 11 20:15:44 CEST 2007
JoH kirjoitti:
>> Tried
>>
>> temp.customRender = CASE
>> temp.customRender {
>> key.field = colPos
>> default < tt_content
>> 0 < tt_content
>> 1 < tt_content
>> 4 < tt_content
>> 0.text.stdWrap.dataWrap = <div class="basicText">|<br class="none"
>> /></div>
>> /*
>> 0.text.stdWrap.split {
>> token = ###SPLITTER###
>
> You are using the token ###SPLITTER### here.
> ###SPLITTER### is just a name for a token that I invented together with this
> solution.
> It could even be something like ###WHATEVER###.
> To make use of it you first have to insert it somehow into your code.
> ###SPLITTER### is nothing that would be inserted by default, it has to be
> inserted manually i.e. by a wrap, a cObject or however you like.
> Without inserting the ###SPLITTER### first you simply can't split the
> content, since the token will never be found by the split function.
>
> Got the point?
>
> Joey
>
>
I got from Peter Klein
- cut --
# Clear original "styles.content.get"
styles.content.get >
styles.content.get = COA
styles.content.get {
# Render all content elements, except the last one.
10 = CONTENT
10 {
table = tt_content
select.orderBy = sorting
select.where = colPos=0
select.languageField = sys_language_uid
select.max = total-1
renderObj < tt_content
renderObj.stdWrap.wrap = <div
class="contentElement">|</div>
}
# Render the last content element.
20 < .10
20.select.max >
20.select.begin = total-1
20.renderObj.stdWrap.wrap = <div class="lastContentElement">|</div>
}
-- cut --
With some modification that worked
More information about the TYPO3-english
mailing list