Following is a list of examples of filter expressions’ syntax. You can use these examples to create your own filter expressions when you configure the widgets.
Visible = true AND Status = Live AND Category.Contains("{Taxonomy ID}")
Visible = true AND Status = Live AND Category.Contains("{Taxonomy ID}") AND Category.Contains("{Taxonomy ID}")
Visible = true AND Status = Live AND (Category.Contains("{Taxonomy ID}") OR Category.Contains("{Taxonomy ID}"))
NOTE: You can view the ID of each classification by adding the Tags widget to a page, clicking its Edit button, deleting the contents of field TaxonomyID, and clicking Save.
Visible = true AND Status = Live AND Tags.Contains("{Taxonomy ID}")
Visible = true AND Status = Live AND (Tags.Contains("{Taxonomy ID}") OR Tags.Contains("{Taxonomy ID}") )
Visible = true AND Status = Live AND CustomFiledName > 0
Visible = true AND Status = Live AND CustomFiledName = 7
Visible = true AND Status = Live AND CustomFiledName.Contains("value1")
Visible = true AND Status = Live AND CustomFiledName = "value1"
Visible = true AND Status = Live AND CustomFiledName.StartsWith("value")
Visible = true AND Status = Live AND Title.Contains("News Title")
Visible = true AND Status = Live AND Title.Contains("news")
Visible = true AND Status = Live AND Content.Contains("ipsum")
Visible = true AND Status = Live AND Content.Contains("long established fact")
Visible = true AND Status = Live AND Author = "author"
Visible = true AND Status = Live AND Author != " author"
Visible = true AND Status = Live AND Author.Contains("author")
Visible = true AND Status = Live AND PublicationDate <= DateTime.UtcNow // Shows all
Visible = true AND Status = Live AND PublicationDate < DateTime.UtcNow // Shows all
Visible = true AND Status = Live AND PublicationDate > DateTime.UtcNow // Shows none
To filter only items where the date component of the value specified in the DateLogged field matches the date component of DateTime.UtcNow use:
Visible = true AND Status = Live AND DateLogged.HasValue AND DateLogged.Value.Date = DateTime.UtcNow.Date
To filter events by EventStart and EventEnd dates, for example events that from 1st of January 2014 and end till 4th of January 2014 use:
Visible = true AND Status = Live AND EventStart > (01/01/2014) AND EventEnd < (04/01/2014)
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important