More in this section

Forums / Developing with Sitefinity / Limit News Module to Display Only First 3 Items

Limit News Module to Display Only First 3 Items

2 posts, 0 answered
  1. Troy Lawrence
    Troy Lawrence avatar
    56 posts
    Registered:
    07 Jan 2010
    09 Mar 2010
    Link to this post
    Hi, I have a news module on the bottom right of my home page.  Currently it displays all of the news items.   Is there a way to limit it to only display the 3 most recent items?   

    Here's a link to my page:
    My Site
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    09 Mar 2010
    Link to this post
    Hi Troy Lawrence,

    Open the control in edit mode and go to step 3 - News settings of the Control designer . There is a property that you can set to 3 - . Under advanced Tab you can use Sort and FilterExpression properties if necessary.

    Another option would be creating a custom control that uses

    GetContent(int from, int max, string sortExp) – Get specific subset of content with specified starting position and maximum number, ordered by sorting expression

    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.
2 posts, 0 answered