Issue Feature Closed

#68069Provide an API to get sys_categories of a given page ID

Moritz Ahl 07/13/15, 15:11 updated 06/17/23, 00:01

Description

Currently, there seems to be no elegant way to retrieve sys_categories for a given page ID.
Usage example: In an extbase actionController, I want to retrieve Records which belong to the categorie(s) which is/are associated to the current Page ID. To archieve this, I need to be able to first read all categories which belong to a certain Page ID, and then get the corresponding records I’m interested in.

I have found this doc:
http://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Categories/Index.html

…but it only describes how to get records of a certain category, not the other way round. Of course I could write my own DB statement. But IMO, getting the sys_categories for a page is a basic thing that should made easy by providing an API method.

For example:
Input: page UID
Output: array of category UIDs or comma-separated.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.