PIDinRootline for TCA mm relation for 'foreign_table_where'

落爺英雄遲暮 提交于 2019-12-12 04:42:22

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!