【问题标题】:Searchbox in menu for TYPO3 9.5 LTSTYPO3 9.5 LTS 菜单中的搜索框
【发布时间】:2018-12-04 11:12:25
【问题描述】:

我目前正在使用新的TYPO3 9.5 LTS 版本开发一个网站,并且需要实现一个搜索框。
这个搜索框应该出现在菜单中的所有页面上,没有任何高级搜索链接或其他不必要的东西。 只需一个简单的输入字段即可在网站上搜索内容。

在过去,我使用 Faceted Search 扩展 (ke_search) 进行了此操作。 但是这个扩展目前只支持TYPO3 最高版本8.7.99。

有人知道在TYPO3 9.5 LTS 中提供相同功能的可能性吗?

【问题讨论】:

    标签: typoscript faceted-search search-box typo3-9.x


    【解决方案1】:

    也许您可以查看 indexted_search 的 CORE 拆分。 它不如 ke_search 好,但也许你现在可以使用它,直到 ke_search 可用于 TYPO3 9.5.x

    【讨论】:

      【解决方案2】:

      联系 ext:ke_search 的所有者。我认为他们正在开发新版本,您可能已经可以测试了。
      您还可以用金钱“贿赂”他们以更快地完成更新。 ;-)

      【讨论】:

        【解决方案3】:

        目前我们使用 indexed_search 创建了一个搜索框,直到 ke_search 准备好使用这个 Typo3 版本。

        我们的带有引导输入组的搜索框的 TYPOScript:

        # Searchbox
        lib.searchbox = COA_INT
        lib.searchbox {
            10 = TEXT
            10 {
                typolink {
                    parameter = 110
                    additionalParams = &tx_indexedsearch_pi2[action]=search&tx_indexedsearch_pi2[controller]=Search
                    useCacheHash = 1
                    returnLast = url
                }
                wrap = <form action="|" method="post" id="search-block-form" class="form-search"><input type="hidden" name="tx_indexedsearch_pi2[search][languageUid]" value="0" /><div class="input-group">
            }    
            20 = COA
            20 {
                10 = TEXT
                10.data = GPvar : tx_indexedsearch |sword
                10.wrap ( 
                    <input class="form-control" type="text" name="tx_indexedsearch_pi2[search][sword]" id="tx-indexedsearch-searchbox-sword" placeholder="Suche" />
                )
                20 = COA
                20 {            
                    10 = TEXT
                    10.value = <span class="input-group-btn"><button type="submit" class="btn btn-default btn-primary"><span class="icon glyphicon glyphicon-search" aria-hidden="true"></span></button></span>
                }
            }
            wrap = | </div></form>
        }
        

        有了这个 TYPOScript,我们可以像这样将它添加到流体模板中:

        <section class="searchbox-wrapper">
            <f:cObject typoscriptObjectPath="lib.searchbox" />
        </section>
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2019-03-31
          • 1970-01-01
          • 2021-07-19
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多