7 YEARS AGO

Quick tip: how to easily enable content filtering for your editors

Almost everytime when I am providing editor training I am being asked if and how it's possible to filter content. In this post I will show you how easy it is to configure custom filters for your content types using alternative forms and achieve extreme fast result.

Before we start let me just quickly provide you with some basics on the concept of alternative forms. Taken from the Kentico documentation:

"Alternative forms allow you to create different versions of existing forms. The alternative forms can then be used instead of the default form in the system's administration interface or on the live site. You can create multiple alternative forms for a single object and use each of them in a different situation."

This means that you can influence Kentico's user interface using alternative forms within objects (for example page types). The way it works is that Kentico has reserved code names to automatically apply the alternative form when the corresponding action is performed. It concerns the following code names:
  • filter (displays filter above a list of items)
  • insert (when creating a new item)
  • newculture (when creating a new culture version of a page)
  • update (when editing an existing item)
The action that I want to highlight in this post is how you can leverage filtering within page types using the filter code name.

Step 1: Create the alternative form with code name "filter" for the page type that you want to enhance with additional filtering (in this example I will use the Dancing Goat Article).

Alternative form with code name filter

Step 2: Go through the list of fields and configure them to use the "text filter" form control. Please note that some fields will not lend for filtering. Simply turn them off by unchecking the box in "Display field in the editing form".

Configure text filters

Step 3: View the result! Go to the Pages application --> Hit the "Listing" button and select the page type in the top right corner.

Enhanced filter

For more info on displaying filters using alternative forms check out the Kentico documention.

Happy tweaking!