承接 rkl/autocomplete-for-indexedsearch 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rkl/autocomplete-for-indexedsearch

最新稳定版本:1.0.1

Composer 安装命令:

composer require rkl/autocomplete-for-indexedsearch

包简介

Adds autocomplete functionality to the TYPO3 indexed search field.

README 文档

README

TYPO3 12 TYPO3 13 TYPO3 13

TYPO3 Extension: Autocomplete for IndexedSearch

This extension adds autocomplete functionality to TYPO3 indexed search fields.

TYPO3 Indexed Search autocomplete suggestions

Features

  • Supports TYPO3 12 and 13
  • No further dependencies
  • Comes with limited styling for easy customizability
  • Handles inputs with multiple words

Installation

The recommended way to install Autocomplete for IndexedSearch is by using Composer:

composer require rkl/autocomplete-for-indexedsearch

Setup

1. Include the static TypoScript of the extension

  1. Go to Site Management -> TypoScript
  2. Open your TypoScript template and click "Edit the whole TypoScript record"
  3. In the tab "Advanced Options", include the TypoScript set: "Autocomplete for Indexed Search (autocomplete_for_indexedsearch)"

2. Override the Form.html template from indexed_search

  1. Copy the partial from EXT:indexed_search/Resources/Private/Partials/Form.html to your own site package, for example to EXT:my_sitepackage/Resources/Private/IndexedSearch/Partials/Form.html
  2. Add your partial root path to the plugin configuration of Indexed Search in the TypoScript of your site package:
plugin {
  tx_indexedsearch {
    view {
      partialRootPaths.200 = EXT:site_package/Resources/Private/IndexedSearch/Partials/
    }
  }
}

3. Place the ViewHelper to render suggestions

Add the ViewHelper <rkl:autocompleteSuggestions /> to your overridden Form.html. It renders the container in which suggestions will be displayed.

<html
  xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
  xmlns:rkl="http://typo3.org/ns/RKL/AutocompleteForIndexedSearch/ViewHelpers"
  data-namespace-typo3-fluid="true"
>
<!-- ... -->
<rkl:autocompleteSuggestions searchonclick="0" minlength="2" />

Add the ViewHelper wherever it suits your styling needs the best. Ideally it's placed close to the search field. Also remember to add the namespace RKL/AutocompleteForIndexedSearch/ViewHelpers like shown in the example.

ViewHelper attributes

The autocompleteSuggestions ViewHelper provides the following attributes to manipulate the behavior of the autocomplete suggestions:

Attribute Allowed values Description
searchonclick bool (0/1) defines whether to instantly submit the search form when a suggestion is clicked
minlength int minimum string length of the search term for autocompletion to start

Optional: Add a Route Enhancer

For prettier autocomplete URLs you can add the autocomplete page type to your routeEnhancers:

routeEnhancers:
  PageTypeSuffix:
    type: PageType
    index: ''
    map:
      search-autocomplete: 7603976

Links

URL
Repository: https://github.com/RKlingler/autocomplete_for_indexedsearch/
TER: https://extensions.typo3.org/extension/autocomplete_for_indexedsearch
Packagist: https://packagist.org/packages/rkl/autocomplete-for-indexedsearch

Sponsorships

PayPal: www.paypal.me/rukling

统计信息

  • 总下载量: 449
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2025-02-03