Quantcast
Viewing all articles
Browse latest Browse all 9076

Getting block data from ContentRepository

I've inherented an Episerver website, making me a newbie once again.  My current task is to move a slider type content area off of a page template into a "block with blocks" configuration, in order to have more granular content scheduling for that page.

I'm stuck trying to move the property that points to the page data:

protected HomePage HomePageData
{
get
{
return ContentRepository.Get<HomePage>(PageReference.StartPage);
}
}

Into something that points to the containing block data, for example:

protected UpcomingEventsBlock UpcomingEventsData
{
get
{
return ContentRepository.Get<UpcomingEventsBlock>(contentLink);
}
}

Thanks,

Mark


Viewing all articles
Browse latest Browse all 9076

Trending Articles