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?
Can't you use a PageReference for your RootPage instead of LinkItem?
Ah, makes sense. Thanks!
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;
using System.Linq;
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?