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

Forums / Designing & Styling / List Widget

List Widget

4 posts, 0 answered
  1. Patricia
    Patricia avatar
    15 posts
    Registered:
    05 Jun 2015
    30 Jun 2015
    Link to this post
    Is there a way to limit the number of items shown in a widget?? Also to sort by publication date?? because none of the sort expressions that I saw in other forums worked. 
  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    30 Jun 2015 in reply to Patricia
    Link to this post
    Are you making sure to put the sort expression in "ListItemSortExpression"?  Just tried, PublicationDate DESC or PublicationDate ASC works here
  3. Patricia
    Patricia avatar
    15 posts
    Registered:
    05 Jun 2015
    30 Jun 2015
    Link to this post
    Thanks Steve! Yes, it did work. Wow, I thought I tried it in both -- but I guess I was mistaken. Would you have an idea on how to limit the number of list items that are shown in the widget? Instead of having it be everything on the list, can the widget just show 5? 
  4. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    30 Jun 2015 in reply to Patricia
    Link to this post

    Out of the box it doesn't seem like it's possible :/  Kind of goes against the idea of how they see lists I think.  Like a list is a full set of items, where other content types are more unique (does that make sense?)

     Should be easy enough to work around though...create a new class, inherit from "Telerik.Sitefinity.Modules.Lists.Web.UI.ListView" (so you're extending their widget).  Add a couple new public properties for Skip and Take, then in whatever method populates the list data, use those to limit the resultset.

4 posts, 0 answered