[TYPO3-english] Wrap every two items in tt_news
Sergio Catalá
scatala.enet at gmail.com
Wed May 14 17:14:45 CEST 2014
Hi list,
I am using tt_news (3.5.2) and I would like to wrap, in a news list
(code: LIST), every two single items with a specific div (<div
class="row"></div>). I mean:
<div class="row">
<div class="item1">...</div>
<div class="item2">...</div>
</div>
<div class="row">
<div class="item3">...</div>
<div class="item4">...</div>
</div>
I discovered I can create several ###NEWS_X### subsections to reach my
goal (I open the div in the first subsection, and close it in the second
one):
<!-- ###CONTENT### begin-->
<!-- ###NEWS### begin -->
<div class"row">
<div class="events_content round_corn">
###NEWS_IMAGE###
<p class="date">###NEWS_DATE###, ###NEWS_SUBHEADER###</p>
<p
class="title"><!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--></p>
</div>
<!-- ###NEWS### end-->
<!-- ###NEWS_1### begin -->
<div class="events_content round_corn">
###NEWS_IMAGE###
<p class="date">###NEWS_DATE###, ###NEWS_SUBHEADER###</p>
<p
class="title"><!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--></p>
</div>
</div>
<!-- ###NEWS_1### end-->
<!-- ###CONTENT### end -->
The problem is that for an odd number of news items in the list, the
surrounding div would be opened.
Any solution for that problem? Any hint?
Thanks in advance,
Sergio
More information about the TYPO3-english
mailing list