[TYPO3-ect] taxonomies / categories in TYPO3

Mads Brunn mads at typoconsult.dk
Tue Oct 16 17:13:37 CEST 2007


Michael Cannon skrev:
> Do you have a suggestion for tying categories into news so that the 
> category selection is respected? My idea is to write a news extension 
> that pulls in the category selection to the news search array.

You mean tt_news?

I would use some of the hooks in EXT:tt_news/pi/class.tx_ttnews.php

In tx_ttnews->getSelectConf there is a hook that lets you change the 
select configuration:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_news']['selectConfHook']

Use this hook to make tt_news respect the category selection.

If you want to do a nice integration you should also consider this hook:
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_news']['extraCodesHook']

This way you can add an additional view that e.g. displays a category 
menu using tx_categories records (see 
EXT:categories/lib/class.tx_categories_menu.php).

You can add extra options to the "What to display:"-field in tt_news 
flexform using this hook:
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_news']['what_to_display']

(see EXT:tt_news/class.tx_ttnews_itemsProcFunc.php for the last one)

Hope this get's you in the right direction.


> During your T3CON07 presentation, I'm pretty sure I recall a text-based 
> search input above the right column of categories to help speed up 
> finding things. Can you enlighten us as to how you did that?

First of all, download the latest version (I've just uploaded the latest 
changes). Then look in EXT:categories/tca/tx_categories_tca.inc (line 
24-25).


Best regards

Mads Brunn




More information about the TYPO3-team-extension-coordination mailing list