Filters

The filter system provides a mechanism to allow writers of applications and modules to easily add functions to the /Lynicon/Items/List Filtering UI page.

Adding Filters by Attributes

A filter bar can be added to the Filtering page for a given piece of content or content parent class by using FieldFilterAttribute on a property to let the user filter, sort by or show that property.  This functionality works on:

  • String
  • DateTime
  • Reference
  • Foreign Key

fields.  For example, the filter for the Title of an item is set up in core Lynicon code on the Summary type like this:

[FieldFilter("Item Title", Showable = false)]
public string Title { get; set; }

Adding Filters Manually

A filter can be added manually if it doesn't naturally associate itself with a field like this:

LyniconUi.Instance.Filters.Add(new PublishingFilter());

You can make custom filters by inheriting from any of the existing filter types.