TYPO3 Logo
ke_search
Release: 3.5

Loading data.

  • Introduction
  • Examples
  • Quick start
  • Indexing
    • Pages
    • Content Elements
    • News (EXT:news)
    • News (EXT:tt_news)
    • Addresses
    • Files
    • Custom Indexer
    • Indexing custom content fields
  • Filters / Faceted Search
    • Faceted Search Setup
    • Filter Types
    • Using system categories for filtering
  • Templating
    • Use your own CSS
    • Use your own Templates
    • Searchbox on every page
    • Images
    • Template Selector
    • Custom values in the search result list
    • Link ViewHelper
  • Configuration
    • Search word length
    • Sorting
    • Routing (Speaking URLs)
    • Highlighted Word
    • Reduce filters shown in the backend
    • Override record storage page
    • Notes
    • Storage Engine
  • Multilangual support
  • Search behaviour
    • Search options
    • Ranking / Sorting
  • Statistics
    • Statistics using Google Analytics
  • Hooks
  • Logging
  • Command Line Tools
  • Changelog
  • Premium version

PAGE CONTENTS

  • Link ViewHelper
    • Parameters
    • Setting filters
    • Example
  1. Start
  2. Templating
  3. Link ViewHelper
View source

Link ViewHelper¶

A link ViewHelper is provided to generate links to search result pages including a search word and filters.

Parameters¶

  • page (integer): Target page
  • piVars (array): pivars (sword, filter[…], page, sortByField, sortByDir, resetFilters)
  • resetFilters (array): Filters to reset
  • keepPiVars (boolean): Should the piVars be kept?
  • uriOnly (boolean): Returns only the uri.
  • section (string): Anchor for links

Additionally the standard HTML universal attributes can be used (like class, dir, id, lanag, style, title, accesskey, tabindex, onclick).

Setting filters¶

In order to use filters with the link ViewHelper you will need to know the filter UID, the tag of the filter option and (if you use a checkbox filter) the UID of the filter option. Please see the example below.

Example¶

<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
      xmlns:kesearch="http://typo3.org/ns/TeaminmediasPluswerk\KeSearch\ViewHelpers"
      data-namespace-typo3-fluid="true">

<ul>
   <li><kesearch:link page="85" piVars="{sword: 'elephants'}" class="my-link-class">Search for elephants</kesearch:link></li>
   <li><kesearch:link page="85" piVars="{filter_13: 'page'}" class="my-link-class">Show all pages</kesearch:link></li>
   <li><kesearch:link page="85" piVars="{sword: 'elephants', filter_13: 'page'}" class="my-link-class">Search for elephants in pages</kesearch:link></li>
   <li><kesearch:link page="85" piVars="{sword: 'elephants', filter_13: 'page', filter_3_278: 'syscat92'}" class="my-link-class">Search for elephants in pages and use a checkbox filter</kesearch:link></li>
</ul>
  • Previous
  • Next
  • Issues
  • Repository

Last updated: Mar 05, 2021 10:01

Last rendered: Nov 19, 2021 08:25

TYPO3 Theme 4.6.2

© Copyright by {extension.extensionKey}
  • Legal Notice
  • Privacy Policy