SaaS CMS has officially launched! Learn more now.

Block (SiteContentType) for listing news


How would a good practice be in regards of making a block (SiteContentType) that lists the latest news?

So far i've made a couple of properties: 

Heading string

NumberOfNewsListed int

RootPage LinkItem  Points to a newspage with children (suspect that this is wrong)

virtual IEnumerable<PageData> News 
should return children (Limited to newsitems) of the RootPage property


Right now, I'm struggeling with making a PageReference och PageData from the RootPage LinkItem.

Any suggestions?

Aug 07, 2013 10:51

Can't you use a PageReference for your RootPage instead of LinkItem?

Aug 07, 2013 11:54

Ah, makes sense.  Thanks!

Aug 07, 2013 13:11

I cannot access the Where|Any|SortBy method on a PageDataCollection object.  
Have I missed to reference smthg?

using EPiServer;
using EPiServer.Web;
using EPiServer.SpecializedProperties;
using EPiServer.Core;
using EPiServer.Filters;

Aug 07, 2013 14:11

using System.Linq;

Aug 07, 2013 15:27
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.