Issue Feature Closed

#65228Simple way to read sys_category

Urs Braem 02/23/15, 10:38 updated 11/01/26, 16:19

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

  1. taywa gmbh commented <span data-processor="relativetime" data-value="2016-08-16T17:20:39+00:00" > 08/16/16, 17:20 </span>

    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/ ;-)

  2. Rafal Brzeski commented <span data-processor="relativetime" data-value="2016-10-05T17:08:32+00:00" > 10/05/16, 17:08 </span>

    Hello, please give a chance to this feature for 8 LTS

  3. Georg Ringer changed Complexity easy Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2024-06-23T19:09:56+00:00" > 06/23/24, 19:09 </span>

  4. Georg Ringer commented <span data-processor="relativetime" data-value="2024-06-23T19:10:14+00:00" > 06/23/24, 19:10 </span>

    I suggest adding a dedicated dataprocessor for that

  5. Georg Ringer commented and changed status New Closed <span data-processor="relativetime" data-value="2026-11-01T16:19:56+00:00" > 11/01/26, 16:19 </span>

    Hey,

    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