More in this section

Forums / Developing with Sitefinity / Filtering via URL

Filtering via URL

2 posts, 0 answered
  1. Jason
    Jason avatar
    16 posts
    27 Aug 2008
    10 May 2012
    Link to this post
    Hi All,

    I'm looking to create a custom module and then filter the list view based on the URL.  For example:

    http://myurl/programs - would list all programs
    http://myurl/programs/NH - all program within NH

    I've been looking through the documentation and haven't quite been able to get a handle on how to accomplish this.  Any pointers?  

  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    18 Jul 2012
    10 May 2012
    Link to this post
    Jason, Sitefinity routing converts requests like this into parameters in the RouteData.Values property of the Request. You can absolutely retrieve these from your controls to get specific items based on these parameters.

    Take a look at this post that explains how you might do this:

    This is the same procedure used for the Intrasite Testimonials Module example from the Sitefinity SDK.

    Another key element is the method:


    which tells the response not to return 404, but instead continue executing the code on your control. Call this when you find the elements based on the input parameters.

    I hope this is helpful!
2 posts, 0 answered