How to do a custom date range sort

2 posts, 0 answers
  1. Boulevard
    Boulevard avatar
    1 posts
    Member since:
    Jul 2013

    Posted 27 Mar 2014 Link to this post

    I have a module called Employees that is for a company directory. There's a field in that module that has the BIRTH DATE.  What do I need to do to get the employees to show in a date range? For example, I want to show who's celebrating a birthday in the next three weeks. I'd like to display their pic, name and birthday (e.g. Pic, Bob Smith, June 22nd).
  2. Sabrie Nedzhip
    Admin
    Sabrie Nedzhip avatar
    8 posts

    Posted 07 Apr 2014 Link to this post

    Hi Bryan,

    You can create a user control (.ascx file) and query in the code behind the employees who have birthday in the next three weeks. You can find samples on how to retrieve employees through filtering and how to work with your dynamic module programatically in the code reference which is automatically generated for your custom module created using the Module Builder. To view the generated code samples please go to Administration -> Module builder and select your moduleThen please click on the Code reference for < module name> link which is on the right-hand side of the page. Here is a screenshot for your convenience.

    After you get the employees filtered by their birth date in the code behind, you can bind them to a ListView or any other control in order to display the desired information about the employees on the frontend.

    After performing the above, you can register the user control using Sitefinity Thunder as described in the following documentation article and add the widget on your page.

    Regards,
    Sabrie Nedzhip
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
Back to Top