London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Block (SiteContentType) for listing news

Vote:
 

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?

#73730
Aug 07, 2013 10:51
Vote:
 

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

#73732
Aug 07, 2013 11:54
Vote:
 

Ah, makes sense.  Thanks!

#73736
Aug 07, 2013 13:11
Vote:
 

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;

#73739
Aug 07, 2013 14:11
Vote:
 

using System.Linq;

#73741
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.