[TYPO3-ttnews] sorting CATMENU (subcategories)

Kevin Renskers kevin at dauphin-mm.nl
Thu Mar 23 10:04:40 CET 2006


I had the same problem, but I solved it in the database:
phpMyAdmin -> tt_news_cat -> Operations -> Alter table order by

You can then either order by title (what I did) or manually alter the 
order field and alter order on that field.

When you add new categories you'll probably have to do it again so it's 
not a perfect solution, but I don't change my categories often, and 
don't want to hack in the code.

Just my 2 cents,
Kevin


> Hi!
> using tt_news 2.2.24 typo3 3.8.1
> 
> I want to sort a catmenu by title.
> no problem with catOrderBy = title
> but it don't sort the subcategories
> 
> 
> I found in
> class.tx_ttnews.php Zeile 1609:
> 
> $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, 'tt_news_cat', 
> 'parent_category=0' .$this->SPaddWhere. 
> $this->enableCatFields,'',$this->config['catOrderBy']);
> 
> when setting parent_category=0  to parent_category= 16
> it does work but I've more than one Maincategory
> 
> 
> (the subcategories are sorted by crdate at the moment)
> 
> thanx for hints
> 
> Joachim
> 
> 
> TS-Setup:
> 
> lib.newslinks < plugin.tt_news
> lib.newslinks {
>   code >
>   code =  CATMENU
>   pid_list >
>   pid_list = 152
> # the pids of the pages where your news are stored
> #  recursive = 3
>   catImageMode = 0
>   catTextMode = 0
>   categoryMode = 1
>   useSubCategories = 1
>   displaySubCategories = 1
> categorySelection = 16
>   catSelectorTargetPid = 168
> # sort does not work for subcategories:
>  catOrderBy = title
> 
> 
> 
>  displayCatMenu {
> # patch to display only selected category from: 
> http://www.typo3.net/index.php?id=13&action=list_post&tid=28045&page=2
>     excludeCatIdList = 5,6,7,8
>     mode = nestedWraps
> 
>     # wrap for the complete "catmenu"
>     catmenu_stdWrap.wrap = <div class="news-catmenu">|</div>
>     # wraps for active or inactive category links in the tree
>     catmenuItem_ACT_stdWrap.wrap = <img 
> src="tslib/media/bullets/bullet1_h.gif" />|
>     catmenuItem_NO_stdWrap.wrap = <img 
> src="tslib/media/bullets/bullet1_n.gif" />|
>     # wrap for level "n"
>     catmenuLevel1_stdWrap.wrap = <div class="level1">|</div>
>     catmenuLevel2_stdWrap.wrap = <div class="level2">|</div>
> }
> }



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