[TYPO3-ttnews] Three column list view

Claus Fassing claus at fassing.eu
Thu Nov 3 14:16:57 CET 2011


tt_news 3.1.0
TYPO3 4.5.6

Hi
I have a 3 column layout in the list view, but get in trouble if less 
than 3 item available. This can happen, of course, on the last page.
I thought to fix it as follows

<!-- ###TEMPLATE_LIST2### begin -->
<div class="news-list2-container">
   <!-- ###CONTENT### begin -->
   <div class="col3">
     <!-- ###NEWS### begin -->
       <div class="sp1"> ###CATWRAP_B### ###TEXT_CAT### 
###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###
	<!--###LINK_ITEM###-->###NEWS_IMAGE###<!--###LINK_ITEM###-->
	<h4>###NEWS_TITLE###</h4>
	###NEWS_SUBHEADER###
       </div>
       <!-- ###NEWS### end-->
       <!-- ###NEWS_1### begin -->
       <div class="sp2"> ###CATWRAP_B### ###TEXT_CAT### 
###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###
	<!--###LINK_ITEM###-->###NEWS_IMAGE###<!--###LINK_ITEM###-->
	<h4>###NEWS_TITLE###</h4>
	###NEWS_SUBHEADER###
       </div>
       <!-- ###NEWS_1### end-->
       <!-- ###NEWS_2### begin -->
       <div class="sp3"> ###CATWRAP_B### ###TEXT_CAT### 
###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###
	<!--###LINK_ITEM###-->###NEWS_IMAGE###<!--###LINK_ITEM###-->
	<h4>###NEWS_TITLE###</h4>
	###NEWS_SUBHEADER###
       </div>
       <div class="cleardiv"></div>
     <!-- ###NEWS_2### end-->
   </div>
   <!-- ###CONTENT###  end -->
   ###BROWSE_LINKS###
</div>
<!-- ###TEMPLATE_LIST2### end -->


The div container col3 is ignored on this position.
If I investigate it right, it was already possible to set it between 
###CONTENT### and news subpart, isn't it ?

If I put the div col3 into the news subpart as follows

<!-- ###TEMPLATE_LIST2### begin -->
<div class="news-list2-container">
   <!-- ###CONTENT### begin -->
     <!-- ###NEWS### begin -->
       <div class="col3">
	<div class="sp1"> ###CATWRAP_B### ###TEXT_CAT### ###NEWS_CATEGORY### 
###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###
	  <!--###LINK_ITEM###-->###NEWS_IMAGE###<!--###LINK_ITEM###-->
	  <h4>###NEWS_TITLE###</h4>
	  ###NEWS_SUBHEADER###
	</div>
	<!-- ###NEWS### end-->
	<!-- ###NEWS_1### begin -->
	<div class="sp2"> ###CATWRAP_B### ###TEXT_CAT### ###NEWS_CATEGORY### 
###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###
	  <!--###LINK_ITEM###-->###NEWS_IMAGE###<!--###LINK_ITEM###-->
	  <h4>###NEWS_TITLE###</h4>
	  ###NEWS_SUBHEADER###
	</div>
	<!-- ###NEWS_1### end-->
	<!-- ###NEWS_2### begin -->
	<div class="sp3"> ###CATWRAP_B### ###TEXT_CAT### ###NEWS_CATEGORY### 
###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###
	  <!--###LINK_ITEM###-->###NEWS_IMAGE###<!--###LINK_ITEM###-->
	  <h4>###NEWS_TITLE###</h4>
	  ###NEWS_SUBHEADER###
	</div>
       </div>
       <div class="cleardiv"></div>
     <!-- ###NEWS_2### end-->
   <!-- ###CONTENT###  end -->
   ###BROWSE_LINKS###
</div>
<!-- ###TEMPLATE_LIST2### end -->

the layout is breaking with less than 3 items cause the closing div is 
inside of ###NEWS_2### which is not available.

Is there any solution to get this working ?

Alternative it would be enough just to set a limit of the whole items to 
show, e.g I have 37 items, set it to 36 items as a max value. But I 
could only find a limit option for every page.

Any other suggestion are welcome.

Regards Claus


More information about the TYPO3-project-tt-news mailing list