#65228Simple way to read sys_category
Description
Until now, it’s not simple to get sys_category entries for items, like a page.
There are several examples around on how to do it by TS, the one that works for me is on http://stackoverflow.com/a/28559654/160968, others are on http://www.typo3-probleme.de/2014/04/07/typo3-6-x-kategorien-auslesen-und-verwenden/
I think it should be possible to use sys_category directly via getText,
for example:
temp.page_cats = TEXT
temp.page_cats.data = {page:categories}
Returning a comma separated list.
This would facilitate reusing of the system-wide categories in many places.
To stay with my example, with tx_news, you could then do
settings.useStdWrap = categories
settings.categories.override.cObject.data = {page:categories}
settings.categoryConjunction = or
and display all news that share the page’s categories – very simple handling for editors!
A recursive “slide” option might be desirable as well.
What do you think?
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 13
-
Stephan Großberndt changed target version 03/11/15, 22:58
-
Benni Mack changed target version 06/15/15, 17:08
-
Susanne Moog changed target version 08/05/15, 10:26
-
Benni Mack changed target version 09/24/15, 08:26
-
taywa gmbh commented 08/16/16, 17:20
-
Rafal Brzeski commented 10/05/16, 17:08
Hello, please give a chance to this feature for 8 LTS
-
Riccardo De Contardi changed target version 02/23/17, 14:27
-
Susanne Moog changed target version 01/28/18, 14:28
-
Benni Mack changed category 06/19/24, 20:57
-
Georg Ringer changed Complexity easy Sprint Focus On Location Sprint 06/23/24, 19:09
-
Georg Ringer commented 06/23/24, 19:10
I suggest adding a dedicated dataprocessor for that
-
Georg Ringer changed Sprint Focus
On Location Sprint08/06/26, 15:45 -
Georg Ringer commented and changed status
NewClosed 11/01/26, 16:19Hey,
going through older issues of forge and reading this one.
I am closing this in favor of:
- record API
- as suggested using data processors if there is a more special need
hope this is fine for you
Please make categories accessible for pages, content and resources. As they are now implemented they are quite useless. Retrieving them should also accept commonly needed parameters, just like https://developer.wordpress.org/reference/functions/wp_list_categories/ ;-)