有一个多域设置(在同一级别上彼此相邻的域),每个域都有自己的搜索页面和配置。我试过..。
plugin.tx_indexedsearch.settings.rootPidList = 3...to获得的搜索结果仅限于域页面树。但是一旦使用rootPidList,就没有任何结果了。然后我试过..。
plugin.tx_indexedsearch.settings.defaultOptions.sections = rl1_3...and,这似乎是正确的工作,将结果限制在页面树(下面的页id 3)。
那么"rootPidList“是用来干什么的呢?
发布于 2019-12-04 07:49:37
根据代码(search/Classes/Controller/SearchController.php,232线)中的注释:
设置搜索的根PID列表。注意,这些页面ID必须有一个带有根标志的TypoScript模板! 基本上,这个列表用于在"rl0“字段上进行选择,只有当有一个带有根标志的TypoScript模板记录时,页面ids才被注册为"rl0”。 在上面使用$ This ->searchRootPageIdList之后就会出现这种情况,因为上面的内容将获取当前站点的菜单--不管这里的搜索是什么样的。因此,一般搜索将在整个数据库中查找,而特定部分搜索将使用当前部分。
在多域设置中,我们将rootPidList设置为整个根页面(在本例中为id=457)。
defaultOptions.sections设置如下:
defaultOptions.sections=rl{$customer_theme.search.level}_{$customer_theme.root}
{$customer_theme.search.level}设置为1或2,这取决于每个国家有不止一种语言。
{$customer_theme.root}是根页(由根页标志标记)。
例如,对于印度尼西亚(英语),我们使用level =2和root = 12947。

https://stackoverflow.com/questions/59166510
复制相似问题