[TYPO3-english] SOLVED tt_news orderby category in LIST or LATEST view

Loek Hilgersom hilgersom at xs4all.nl
Tue Aug 25 11:24:28 CEST 2009


Ok, I created it in Typoscript. It works perfectly, except that it doesn't work 
recursively (but that was not necessary now).

For whoever is interested, see the code below.
Loek


plugin.tt_news {
	code >
	code = LATEST
	## useSubCats determines whether articles from subcats are displayed in LIST 
and LATEST
	useSubCategories = 0
	displaySubCategories = 1
	categoryMode = 1
	## root category to show
	categorySelection = 1
}

temp.renderSubCats = COA
temp.renderSubCats {
	## Rendering definition for tt_news subcategories
	10 = TEXT
	10.field = title
	10.wrap = <h2 class="newsCatTitle">|</h2>
	20 < plugin.tt_news
	20.categorySelection.field = uid
}

lib.newsListWithSubcats {

	10 < plugin.tt_news
	
	20 = CONTENT
	20.wrap = <h1>Subcategories:</h1>|
	20 {
		table = tt_news_cat
		select {
			selectFields = uid,title,description
			orderBy = uid
			## PID of Storage page which holds news categories
			pidInList = 2
			## select news-subcategories from current group-news-cat
			where = parent_category = 1
		}
		renderObj < temp.renderSubCats
	}
}



Loek Hilgersom wrote:
> Hi,
> 
> Is there an easy way with tt_news to order the LIST or LATEST view by 
> (sub)categories, where each new category is displayed as a header in the 
> list?
> Or should I code this myself in PHP or TS?
> 
> Thanks,
> Loek
> 


More information about the TYPO3-english mailing list