Sometimes if you have got a lot of information to display on a website, it is easier if end users are able to filter the content. There are already numerous stacks and plugins available which can organise content between tabs, and display this information in panels when selected. However the fundamental problem with these is that you end up forcing users to pick a particular category from a predefined list. That's not aways desirable.

The new Filter stack aims to overcome this issue, by providing end users with a flexible way of filtering content. Not only can end users type their own search terms in the search box, but they can also mix-and-match multiple keywords together. This provides an altogether more powerful solution for filtering and displaying content. This is an excellent stack for providing filtering capabilities on basic content types, like text and images.

When a user starts to type keywords in the search box, some clever code scans all of the containers nested within the Filter stack. Any containers with matching search terms are set to display, and the others get faded-out and hidden from view. It really is that simple. The search field is not case sensitive and can happily accept both alphanumeric and numeric entries. When an active filter is being applied, an optional message can be displayed, highlighted that the results below are being filtered. To undo an applied filter, a user can either delete their keywords from the search box, or hit the clear button.


Loose Filtering Example

In this example, free Figure stacks were dragged and dropped into the Filter region. Each had an image and price added, a bit of blurb and a link. Then some hidden code like <div class="ftag;">green</div> was typed into each item, to act as tags (this is the information the Filter stack will try to find when a search is run). The filter type was set to 'Loose' in the stack settings. To test this demo, type colour names (e.g. green) in the box below to filter T-Shirts by colour. Or try multiple colours like orange and red combined in the same search. You could also try filtering based on pricing.
Displaying filtered search results below...
Stacks Image 357
£10.00
Available in: S / M / L / XL
Add To Cart
blue aqua
Stacks Image 360
£12.00
Available in: S / M / L / XL
Add To Cart
green army brown
Stacks Image 363
£10.00
Available in: S / M / L / XL
Add To Cart
ash grey light
Stacks Image 366
£10.00
Available in: S / M / L / XL
Add To Cart
asphalt dark black
Stacks Image 369
£10.00
Available in: S / M / L / XL
Add To Cart
baby blue light pale
Stacks Image 372
£12.00
Available in: S / M / L / XL
Add To Cart
black lead dark
Stacks Image 375
£8.00
Available in: S / M / L / XL
Add To Cart
silver grey stone
Stacks Image 378
£10.00
Available in: S / M / L / XL
Add To Cart
brown natural wood
Stacks Image 381
£10.00
Available in: S / M / L / XL
Add To Cart
coral red bright
Stacks Image 384
£12.00
Available in: S / M / L / XL
Add To Cart
cranberry red rose
Stacks Image 387
£10.00
Available in: S / M / L / XL
Add To Cart
cream light
Stacks Image 390
£10.00
Available in: S / M / L / XL
Add To Cart
eggplant purple grape dark
Stacks Image 393
£12.00
Available in: S / M / L / XL
Add To Cart
green natural forest
Stacks Image 396
£10.00
Available in: S / M / L / XL
Add To Cart
fuchsia pink girls
Stacks Image 399
£8.00
Available in: S / M / L / XL
Add To Cart
gold yellow
Stacks Image 402
£10.00
Available in: S / M / L / XL
Add To Cart
green grass natural
Stacks Image 405
£10.00
Available in: S / M / L / XL
Add To Cart
green grass natural
Stacks Image 408
£12.00
Available in: S / M / L / XL
Add To Cart
grey stone natural
Stacks Image 411
£10.00
Available in: S / M / L / XL
Add To Cart
lapis blue dark
Stacks Image 419
£10.00
Available in: S / M / L / XL
Add To Cart
lavender light pink neutral
Stacks Image 422
£12.00
Available in: S / M / L / XL
Add To Cart
lemon yellow bright
Stacks Image 425
£10.00
Available in: S / M / L / XL
Add To Cart
blue light sky
Stacks Image 428
£10.00
Available in: S / M / L / XL
Add To Cart
pink light subtle
Stacks Image 443
£8.00
Available in: S / M / L / XL
Add To Cart
green lime
Stacks Image 446
£10.00
Available in: S / M / L / XL
Add To Cart
green mint bright
Stacks Image 449
£10.00
Available in: S / M / L / XL
Add To Cart
blue night dark midnight navy
Stacks Image 452
£12.00
Available in: S / M / L / XL
Add To Cart
green olive dark natural
Stacks Image 455
£10.00
Available in: S / M / L / XL
Add To Cart
red orange bright
Stacks Image 458
£10.00
Available in: S / M / L / XL
Add To Cart
pink light subtle
Stacks Image 461
£10.00
Available in: S / M / L / XL
Add To Cart
purple dark
Stacks Image 464
£12.00
Available in: S / M / L / XL
Add To Cart
red raspberry
Stacks Image 467
£10.00
Available in: S / M / L / XL
Add To Cart
red warm bright
Stacks Image 470
£10.00
Available in: S / M / L / XL
Add To Cart
royal blue dark
Stacks Image 473
£10.00
Available in: S / M / L / XL
Add To Cart
sangria pink red cherry
Stacks Image 476
£8.00
Available in: S / M / L / XL
Add To Cart
green sea foam natural light subtle
Stacks Image 479
£10.00
Available in: S / M / L / XL
Add To Cart
silver grey
Stacks Image 482
£12.00
Available in: S / M / L / XL
Add To Cart
slate grey silver
Stacks Image 485
£10.00
Available in: S / M / L / XL
Add To Cart
sun yellow bright sunshine
Stacks Image 488
£12.00
Available in: S / M / L / XL
Add To Cart
blue teal
Stacks Image 493
£8.00
Available in: S / M / L / XL
Add To Cart
white light snow subtle


Strict Filtering Example

In this example, free Figure stacks were dragged and dropped into the Filter region. Each had an image and price added, a bit of blurb and a link. Then some hidden code like <div class="ftag;">green</div> was typed into each item, to act as tags (this is the information the Filter stack will try to find when a search is run). The filter type was set to 'Strict' in the stack settings. To test this demo, type colour names (e.g. green) in the box below to filter T-Shirts by colour. Or try multiple colours like orange and red combined in the same search. You could also try filtering based on pricing. With strict filtering enabled, only items that match all criteria are shown, unlike loose filtering which displays all items that match one or more criteria.
Displaying filtered search results below...
Stacks Image 1137
£10.00
Available in: S / M / L / XL
Add To Cart
blue aqua
Stacks Image 1155
£12.00
Available in: S / M / L / XL
Add To Cart
green army brown
Stacks Image 1158
£10.00
Available in: S / M / L / XL
Add To Cart
ash grey light
Stacks Image 1169
£10.00
Available in: S / M / L / XL
Add To Cart
asphalt dark black
Stacks Image 1172
£10.00
Available in: S / M / L / XL
Add To Cart
baby blue light pale
Stacks Image 1175
£12.00
Available in: S / M / L / XL
Add To Cart
black lead dark
Stacks Image 1178
£8.00
Available in: S / M / L / XL
Add To Cart
silver grey stone
Stacks Image 1181
£10.00
Available in: S / M / L / XL
Add To Cart
brown natural wood
Stacks Image 1184
£10.00
Available in: S / M / L / XL
Add To Cart
coral red bright
Stacks Image 1187
£12.00
Available in: S / M / L / XL
Add To Cart
cranberry red rose
Stacks Image 1190
£10.00
Available in: S / M / L / XL
Add To Cart
cream light
Stacks Image 1193
£10.00
Available in: S / M / L / XL
Add To Cart
eggplant purple grape dark
Stacks Image 1196
£12.00
Available in: S / M / L / XL
Add To Cart
green natural forest
Stacks Image 1199
£10.00
Available in: S / M / L / XL
Add To Cart
fuchsia pink girls
Stacks Image 1202
£8.00
Available in: S / M / L / XL
Add To Cart
gold yellow
Stacks Image 1205
£10.00
Available in: S / M / L / XL
Add To Cart
green grass natural
Stacks Image 1208
£10.00
Available in: S / M / L / XL
Add To Cart
green grass natural
Stacks Image 1211
£12.00
Available in: S / M / L / XL
Add To Cart
grey stone natural
Stacks Image 1214
£10.00
Available in: S / M / L / XL
Add To Cart
lapis blue dark
Stacks Image 1217
£10.00
Available in: S / M / L / XL
Add To Cart
lavender light pink neutral
Stacks Image 1220
£12.00
Available in: S / M / L / XL
Add To Cart
lemon yellow bright
Stacks Image 1223
£10.00
Available in: S / M / L / XL
Add To Cart
blue light sky
Stacks Image 1226
£10.00
Available in: S / M / L / XL
Add To Cart
pink light subtle
Stacks Image 1229
£8.00
Available in: S / M / L / XL
Add To Cart
green lime
Stacks Image 1232
£10.00
Available in: S / M / L / XL
Add To Cart
green mint bright
Stacks Image 1235
£10.00
Available in: S / M / L / XL
Add To Cart
blue night dark midnight navy
Stacks Image 1238
£12.00
Available in: S / M / L / XL
Add To Cart
green olive dark natural
Stacks Image 1241
£10.00
Available in: S / M / L / XL
Add To Cart
red orange bright
Stacks Image 1244
£10.00
Available in: S / M / L / XL
Add To Cart
pink light subtle
Stacks Image 1247
£10.00
Available in: S / M / L / XL
Add To Cart
purple dark
Stacks Image 1250
£12.00
Available in: S / M / L / XL
Add To Cart
red raspberry
Stacks Image 1253
£10.00
Available in: S / M / L / XL
Add To Cart
red warm bright
Stacks Image 1256
£10.00
Available in: S / M / L / XL
Add To Cart
royal blue dark
Stacks Image 1259
£10.00
Available in: S / M / L / XL
Add To Cart
sangria pink red cherry
Stacks Image 1262
£8.00
Available in: S / M / L / XL
Add To Cart
green sea foam natural light subtle
Stacks Image 1265
£10.00
Available in: S / M / L / XL
Add To Cart
silver grey
Stacks Image 1268
£12.00
Available in: S / M / L / XL
Add To Cart
slate grey silver
Stacks Image 1271
£10.00
Available in: S / M / L / XL
Add To Cart
sun yellow bright sunshine
Stacks Image 1274
£12.00
Available in: S / M / L / XL
Add To Cart
blue teal
Stacks Image 1277
£8.00
Available in: S / M / L / XL
Add To Cart
white light snow subtle


Other examples of use

  • If you have a large document to display, you could split it up into multiple chapters and place each chapter into an individual text stack. Then an end user would be able to type search terms in the filter box, and jump straight to the chapters that match their criteria.
  • When publishing a large archive of images online, you could tag images by location or date. Then an end user would have an easy way of filtering images.

Setup

  1. After installation, drag and drop a Filter stack into your page.
  2. Drag and drop stacks into the Filter region placeholder. For best results, use stacks which allow both text and image input, like the Text stack that comes supplied with RapidWeaver.
  3. If using images, type <div class="ftag">enter, a, list, of, tags, here,</div> in the text area, and use that to define tags relating to your images. These tags can be used to aid searching, if each of the filtrable items lacks text.
  4. Any of the settings shown on the righthand side in stacks edit mode can be changed (hover over each setting to see an informational tooltip).
  5. Under the Filter Region settings, you may wish to adjust the item width, height or padding settings (these settings adjust the grid layout).
The Filter stack works best with simple types of content, like text and images. You can drag and drop your content into the Filter stack in any order. The Filter stack is compatible with most RapidWeaver themes and will work on all major web browsers. Please download and evaluate the free demo version before purchase.

The Filter stack was developed exclusively for RapidWeaver. You will not find the source code anywhere else and the Filter stack was engineered specifically to be used in conjunction with the Stacks plugin. By request, several settings have been added, enabling you to carefully customise the display of the search bar, message text and and clear button (to match your RapidWeaver theme). Hopefully you should find that it is daily easy to setup (with some practice) and even easier for your end users to master.


Tags

As mentioned already, tags can be used to provide search terms for the filter stack to use. Tags are especially important to use if your items lack text. To define a set of tags, type <div class="ftag">enter, a, list, of, tags, here,</div> somewhere within the individual item. There are no limits as to how many tags you can use, and multiple items can share the same tags. Using the F-Tag syntax shown above will display your tags in edit mode, but the tags will be hidden from view when the page is viewed normally through a web browser. If no text is available to filter, the Filter stack will look for tags instead. Even if your filterable items do contain text, you can still supplement this text with tags as well.


Centring the filter form and filter region

We have to use a rather primitive grid layout system, so that the filtrable items can be sorted easily when a filter is applied, and automatically flow from left to right. The downslide of this is that it can be slightly more tricky to create a nice centre-aligned Filter stack, like you see above. Many factors effect the alignment of the filter form and filter region, such as the RapidWeaver theme being used, content container width, item width and padding. To make alignment changes more easier, Left Margin settings have been added for both the filter form and filter region. These settings are located in the stack settings, and allow you to push the filter form and filter region further towards the right, to attain a more centred position.