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

Forums / Developing with Sitefinity / News and document modules - FilterExpression filtering by current language

News and document modules - FilterExpression filtering by current language

2 posts, 0 answered
  1. Gpl
    Gpl avatar
    7 posts
    Registered:
    17 Dec 2008
    19 Jan 2010
    Link to this post
    Hi,

    I have used only static values on the right hand of a filterexpression, is it possible to apply dynamic values like current language or current username etc on the right  hand side? Specifically I want to know if it is possible to apply filter expression to news control and document control which would compare the Tag.Name filter property to the current language selected.

    Many thanks
    Gpl
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    19 Jan 2010
    Link to this post
    Hello Gpl,

    We filter all ContentView controls dynamically. There is no problem to filter the control list by using ContentFilterBuilder instance. Generally you may work with QueryStrings. You can create a custom class that inherits from a ContentView based control and then override CreateChildControls where you may pass the filter. The better option is overriding CreateDataSource or CreateContentList and passing the filter there.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered