Control for rendering news list with specialized template for top level news.

Namespace:  EPiServer.Web.WebControls
Assembly:  EPiServer.Web.WebControls (in EPiServer.Web.WebControls.dll) Version: 5.2.375.236


public class NewsList : PageListData


NewsList has special templates for the first four news and a default NewsTemplate, if you specify NewsTemplate it will be used as fallback for the first four templates that have not been set.

If you have defined all templates except NewsTemplate, you will never see more than four news (you only have definitions for the first four news). If you have defined four templates, but only have two news to display, then only two news will be displayed.

NewsList sets SortBy to "PageStartPublish" and SortDirection to Descending by default.


Example usage of NewsList with special design for the first news.
<episerver:NewsList PageLink="<%#EPiServer.Core.PageReference.StartPage%>" runat="server" ID="Newslist1">
        <episerver:property ID="Property1" CssClass="TopNews" PropertyName="PageLink" runat="server"/>
        <episerver:property ID="Property2" PropertyName="MainBody" runat="server"/>
        <episerver:property ID="Property3" CssClass="NewsLink" PropertyName="PageLink" runat="server"/>

Inheritance Hierarchy

See Also