b13 / menus

TYPO3 Extension for creating fast menus in a fast fashion
GNU General Public License v2.0
54 stars 21 forks source link

[TASK] Make page fields to select configurable via configuration for … #85

Open merzilla opened 1 year ago

merzilla commented 1 year ago

…TreeMenu

Add the possibility to provide a list of page fields to select for the TreeMenu by setting e.g.: pageFields = uid,pid,title,slug

The TreeMenu processor is a fast way to use it e.g. for an RESTful API. In order to create simpler API schemas it´s easier to define which fields are needed from pages. So the schema does not need to provide all ~100 fields if 5-6 are enough.

The change does not touch that nav_title, hasSubpages and subpages will be populated.

achimfritz commented 1 year ago

Hi @merzilla i think you should use the PopulatePageInformationEvent https://github.com/b13/menus/blob/main/Classes/Event/PopulatePageInformationEvent.php (to not bloat the code)