+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Filter Data by MetaField

Filter Data by MetaField

5 posts, 0 answered
  1. Siddesh Kapadi
    Siddesh Kapadi avatar
    239 posts
    Registered:
    09 Oct 2009
    01 Sep 2010
    Link to this post
    Hey,
    I have a requirement of filtering the events by Meta field City in events module. How is the filter statement passed for this.

    Regards,
    Siddesh Kapadi
  2. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    01 Sep 2010
    Link to this post
    You will need to create a custom EventView that inherits from the basic EventView control then add the content filter there. Check this post here.

    Best,

    George
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    01 Sep 2010
    Link to this post
    Hello ,

    I have a requirement of filtering the events by Meta field City in events module. Filtering events inside the module will require to change the EventsITemsList template. You can take a look at


    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. Siddesh Kapadi
    Siddesh Kapadi avatar
    239 posts
    Registered:
    09 Oct 2009
    01 Sep 2010
    Link to this post
    Hello,

    I think my question is a bit mis interpreted. I have a page holding a CustomEventsView class inherited from EventsView class. I just need to show the list of Events that have a city set as 'Chicago'. Rest all should not be displayed.

    Please forgive me if I have interpreted wrongly. But the above examples are not what I have understood to fix my requirement.

    Regards,
    Siddesh Kapadi
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    01 Sep 2010
    Link to this post
    Hello Siddesh Kapadi,

    I just need to show the list of Events that have a city set as 'Chicago'. Rest all should not be displayed.


    Drop EventsView control on page and open it for editing. Go to its Advanced tab >> Filters. Expand this section and there is a property FilterExpression which you can use to filter the control like this - City = "Chicago". This will filter the entire list and return only items that have Chicago as a value of the metakey.

    Just to let you know EventsView is not a module it is a public control that represents data from Event module.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
5 posts, 0 answered