1
votes

I have a TYPO3 v7.6.18 multi-site system with tt_news plugin for news.

Each site has its own news section with different categories like:

enter image description here

I would like to be able to choose from these categories, when creating a news item, but in the Categories&Relations (I have hidden the Relations tab, since I don't use it), I get the whole list of categories from almost all the projects (probably all, there is just a limit on how many it shows):

enter image description here

How can I set it to show only the categories for current page (or least a tree view, where I can see, where the categories belong to), because currently it's impossible to tell, what category belongs to which project (since the names overlap).

1

1 Answers

1
votes

You can use TCA overrides to customize the foreign_table_where configuration option of the categories field in the tx_news_domain_model_news table:

$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['categories']['config']['foreign_table_where'] = ' AND sys_category.pid = ###CURRENT_PID###' . $GLOBALS['TCA']['tx_news_domain_model_news']['columns']['categories']['config']['foreign_table_where'];

Notice that you need to prepend your additional constraint because the existing constraint ends with a ORDER BY.