问题
I have an extension (Typo3 8.7.4) with categories in mm relation. The categories are saved in different pages. So i want to select only categories who are saved in the tree of a certain page and the subpages of this certain page. Is there a marker like the condition in typoscript "PIDinRootline" for selectin entries for foreign_table_where in TCA?
回答1:
rootUid ist the correct treeConfig
回答2:
The TCA foreign_table_where is documented on this page:
https://docs.typo3.org/typo3cms/TCAReference/ColumnsConfig/Type/Select.html#
An here you can find an explanation of the possible markers you can use in the query:
https://docs.typo3.org/typo3cms/TCAReference/ColumnsConfig/Type/Select.html#foreign-table-where
E.g. you can use ###CURRENT_PID### to fetch records form the current page.
回答3:
Try to use below typoscript.
This checks if one of the figures in "pages-uidl" is a PID (pages-uid) in the rootline:
[PIDinRootline = pages-uid, pages-uid, ...]
Do the same as PIDinRootline, except the current page-uid is excluded from check.
[PIDupinRootline = pages-uid, pages-uid, ...]
来源:https://stackoverflow.com/questions/45769162/pidinrootline-for-tca-mm-relation-for-foreign-table-where