定制 brandcom/silverstripe-elemental-site-search-fluent 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

brandcom/silverstripe-elemental-site-search-fluent

Composer 安装命令:

composer require brandcom/silverstripe-elemental-site-search-fluent

包简介

README 文档

README

Basic site search for the SilverStripe Elemental module. It works by saving a text reprentation of the elemental area to an extra field in SiteTree. This version works in a multilanguage setup based on Fluent.

Requires

Usage

Install this module with composer

composer require brandcom/silverstripe-elemental-site-search-fluent

Make sure you don't have FulltextSearchable enabled in _config.php.

Dev/build

A few indexes need to be added to the database. This is done by running a dev/build.

Add the search form

To add the search form, add $SearchForm anywhere in your template.

For example in Header.ss

...
<div class="search-form">
    $SearchForm
</div>
...

Override the template (optional)

Lastly you can override the template for the result page if needed.

Copy

vendor/brandcom/silverstripe-elemental-site-search-fluent/templates/Layout/Page_results.ss

to your template folder, for example:

app/templates/Layout/Page_results.ss

and modify according to your needs.

Clear caches

Then finally add ?flush=1 to the URL and you should see the new template.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-11