Usage of extraData in the filters and sorting object

Usage of extraData in the filters and sorting object

Using filters and sorting extraData in liquid

In search and pages you have access to filters/sorting and in some cases you need to use a specific filter/sorting to have a different setting and this is where this comes in handy.

You can refer to a specific filter/sorting with this syntax:


Note that this is an example and any extraData that has been setup in the feed can be used.

By doing this you can print different things in from the filter.

Here is a list of printable variables within filters and sorting:

  • title — title you’ve given the filter, example: Color

  • name — Name of the variable, example: extraData.color

  • options — This is an array of all options the filter has, so in this case it could be an array of colours. [“red”, “green”, “blue”]

Under options each index has set of variables

  • title

  • nestedTitle

  • depth

  • count

All of the above applies only to search and pages templates. 

Like Follow
  • 3 mths agoLast active
  • 10Views
  • 1 Following