Last active
August 22, 2017 08:43
-
-
Save blacktambourine/3ba36e2c66f54e17737c8beab802a95a to your computer and use it in GitHub Desktop.
RenderingDatasourceHelper Usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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