【问题标题】:indexed_search Multidomain (TYPO3 9 LTS)indexed_search 多域(TYPO3 9 LTS)
【发布时间】:2019-12-03 22:43:40
【问题描述】:

有一个多域设置(域在同一级别上彼此相邻),每个域都有自己的搜索页面和配置。我试过了……

plugin.tx_indexedsearch.settings.rootPidList = 3

...使搜索结果仅限于域页面树。但是一旦使用rootPidList,就再也没有结果了。那我试过了……

plugin.tx_indexedsearch.settings.defaultOptions.sections = rl1_3

...这似乎可以正常工作以将结果限制在页面树(页面 id 3 以下)。

那么“rootPidList”的用途是什么?

【问题讨论】:

    标签: typo3 typo3-9.x tx-indexed-search


    【解决方案1】:

    根据代码中的注释(typo3/sysext/indexed_search/Classes/Controller/SearchController.php, Line 232):

    为搜索设置根 PID 列表。请注意,这些页面 ID 必须有一个带有根标志的 TypoScript 模板!

    基本上,此列表用于在“rl0”字段上进行选择,并且仅当带有根标志的 TypoScript 模板记录存在时,页面 id 才会注册为“rl0”。

    这发生在使用上面的 $this->searchRootPageIdList 之后,因为上面将获取 CURRENT 站点的菜单 - 无论在这里进行这种搜索。因此,一般搜索将在整个数据库中查找,而特定部分搜索将获取当前部分。

    在多域设置中,我们将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。

    【讨论】:

    • 感谢您的精彩解释!
    猜你喜欢
    • 2019-04-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多