Skip to content

Instantly share code, notes, and snippets.

@blacktambourine
Last active August 22, 2017 08:43
Show Gist options
  • Save blacktambourine/3ba36e2c66f54e17737c8beab802a95a to your computer and use it in GitHub Desktop.
Save blacktambourine/3ba36e2c66f54e17737c8beab802a95a to your computer and use it in GitHub Desktop.
RenderingDatasourceHelper Usage
public void Example()
{
//Get the personalised datasource of the "Call To Action" rendering in the "cta" placeholder of this particular "Landing Page" content item.
var landingPageItem = Sitecore.Context.Database.GetItem(landingPageId);
var renderingId = new ID("{3590F496-6D5F-4376-976D-208FCEFC15F3}"); //"Call To Action" View Renderings only
var placeHolderName = "cta";
var itemList = GetPersonalisedPlaceHolderDatasourceItems(Sitecore.Context.Device, landingPageItem, placeHolderName, renderingId);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment