November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi,
You can get the full IContent instance for each item either by fetching the items individually like this:
var items = myPage.MyContentArea.Items.Select(x => x.GetContent());
or by fetching them in bulk using IContentLoader like this:
var loader = ServiceLocator.Current.GetInstance<IContentLoader>();
var contentRefs = myPage.MyContentArea.Items.Select(x => x.ContentLink);
var items = loader.GetItems(contentRefs, currentPage.Language);
To compare versions, you can do that directly in the CMS UI by clicking the compare button () or you can access previous versions of a content item programmatically using the IContentVersionRepository, for example:
var versionRepo = ServiceLocator.Current.GetInstance<IContentVersionRepository>();
var versions = versionRepo.List(myPage.ContentLink, myPage.Language.Name);
Hello everyone,
I have started from Alloy project sample and need to know the following:
I have tried to understand this by using "ServiceLocator.Current.GetInstance<IContentRepository>()" and then using Linq to get the contentItems but not able to got all of the block details. (Like Id,Name etc..)
Please help me to know about this as i need to track the total no of blocks and then which one gets removed so that i can keep the block data where i need to keep it for further uses.