lochmueller / calendarize

📆 Best TYPO3 Calendar ever 📆
http://typo3.org/extensions/repository/view/calendarize
74 stars 84 forks source link

Show only categories from specific storage #771

Closed agendartobias closed 10 months ago

agendartobias commented 10 months ago

Hey,

does you extension respect TSConfig - TCEFORM.tx_calendarize_domain_model_event.categories.PAGE_TSCONFIG_IDLIST = id ?

So editors can see only specific categories when adding records for calendar.

lochmueller commented 10 months ago

Hey @agendartobias do you try your settings? All the fields are default TCA fields... so any TSConfig handling should affect the fields. Or do you already try it and it don't work? Regards, Tim

agendartobias commented 10 months ago

Hey, yes i tried it and dont work :/

But it also true that is use your 13.0.0-dev version (because of TYPO3 12.4.x)

okmiim commented 10 months ago

Hi @agendartobias,

we don't support this out of the box. But you can add this to your own sitepackage.

Configuration/TCA/Overrides/tx_calendarize_domain_model_event.php

$GLOBALS['TCA']['tx_calendarize_domain_model_event']['columns']['categories']['config']['foreign_table_where'] = (
    'AND {#sys_category}.{#pid} IN (###PAGE_TSCONFIG_IDLIST###) ' .
    ($GLOBALS['TCA']['tx_calendarize_domain_model_event']['columns']['categories']['config']['foreign_table_where'] ?? '')
);

Regards

agendartobias commented 10 months ago

@okmiim thank you, it works !!!