[TYPO3-english] Restrict category-tree in News plugin (tx_news) by TCA

Bert Hiddink [BENDOO e-work solutions] hiddink at bendoo.nl
Mon Jun 13 19:10:30 CEST 2016


Hello,

Could only get this work this way:

1) In the flexform:
								<foreign_table_where> AND (sys_category.sys_language_uid = 0 OR 
sys_category.l10n_parent = 0) AND sys_category.pid IN 
(###PAGE_TSCONFIG_IDLIST###) ORDER BY 
sys_category.title</foreign_table_where>

2) Then in PageTS:

#These are the IDs of the PID where the News-flexform reads the 
categories from
TCEFORM.tt_content.pi_flexform.PAGE_TSCONFIG_IDLIST = 565,2

Regards.
Bert



On 13/06/16 17:40, Bert Hiddink [BENDOO e-work solutions] wrote:
> On 13/06/16 17:13, Bert Hiddink [BENDOO e-work solutions] wrote:
>> Hello,
>>
>> In TYPO3 6.2.25/tx_news, I want to restrict the category-tree when
>> someone edits the plugin by flexform.
>> However, the following:
>>
>> TCEFORM.tx_news_domain_model_news.categories.config.treeConfig {
>>     rootUid = 2
>>     appearance.nonSelectableLevels = 0
>> }
>> ...does not have any effect.
>> Any ideas?
>>
>> Thanks in advance!
>> Bert
>
> A solution would be to change the flexform.xml fromt the news. If I
> hardcode '565' there:
>                             <foreign_table_where> AND
> (sys_category.sys_language_uid = 0 OR sys_category.l10n_parent = 0) AND
> sys_category.pid=565 ORDER BY sys_category.title</foreign_table_where>
>
> ...it works but I would like to control this by TS or some variable.
> Fe. ###CURRENT_PID###. However, the flexform does not seem to read this
> variable?
>
> Any suggestions?
>
> Thanks and regards,
> Bert



More information about the TYPO3-english mailing list