1

在默认的 indexsearch 扩展中,我在搜索结果中突出显示了关键字,但是当我使用 FLUID 版本时它不起作用,我发现控制器的功能不同,为默认模板和 FLUID 准备了描述。错字3/sysext/indexed_search/Classes/Controller/SearchController.php

452 行 --- 为 FLUID 准备

  $resultData['description'] = $this->makeDescription(
        $row,
        (bool)!($this->searchData['extResume'] && !$headerOnly),
        $this->settings['results.']['summaryCropAfter']
    );

(bool)!($this->searchData['extResume'] && !$headerOnly)应该给' false'但没有。我检查 tsextResume = 1headerOnly = false. 所以这似乎是错误的构造?

当更换(bool)!($this->searchData['extResume'] && !$headerOnly)false. 我得到了 murkups,但我还需要从 --- 更改流体模板中的输出格式

    ...
    <f:if condition="{row.headerOnly} == 0">
        <p class="tx-indexedsearch-description">{row.description}</p> 
...

至 - - -

...
<f:if condition="{row.headerOnly} == 0">
    <p class="tx-indexedsearch-description"><f:format.html>{row.description}</f:format.html></p>
...

现在它工作了,但我仍然不明白为什么它默认不工作?

4

2 回答 2

1

我认为这是一个错误 - 我已经为此创建了一个错误报告。

https://forge.typo3.org/issues/77682

也许您可以提供一个补丁并将其推送到审查系统 - 这将非常有帮助!

于 2016-08-31T08:18:06.427 回答
1

还有一种替代方法:

在 Searchform 中定义一个隐藏字段:(Resource/Private/Partials/Form.html)

<f:form.hidden name="search[extResume]" value="1" />

Searchsresult.html我会使用 format.raw 而不是 format.html。

<p class="tx-indexedsearch-description"><f:format.raw>{row.description}</f:format.raw>
于 2016-09-19T09:35:23.650 回答