Class NewsList

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

Inheritance
System.Object
NewsList
Namespace: EPiServer.Web.WebControls
Assembly: EPiServer.Web.WebControls.dll
Version: 8.11.0
Syntax
public class NewsList : PageListData
Remarks

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.

Examples

Example usage of NewsList with special design for the first news.

Constructors

NewsList()

Declaration
public NewsList()

Properties

FirstNewsTemplate

The template for the first item

Declaration
public ITemplate FirstNewsTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

FooterTemplate

Default template for pages

Declaration
public ITemplate FooterTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

FourthNewsTemplate

The template for the fourth item

Declaration
public ITemplate FourthNewsTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

HeaderTemplate

Default template for pages

Declaration
public ITemplate HeaderTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

NewsTemplate

Default template for pages

Declaration
public ITemplate NewsTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

SecondNewsTemplate

The template for the second item

Declaration
public ITemplate SecondNewsTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

ThirdNewsTemplate

The template for the third item

Declaration
public ITemplate ThirdNewsTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

Methods

CreateChildControls()

Declaration
protected override void CreateChildControls()