Skip to content

Instantly share code, notes, and snippets.

@thinkfreshnick
Created June 25, 2021 10:07
Show Gist options
  • Save thinkfreshnick/c882d298165365818d0c02cd5ac92c37 to your computer and use it in GitHub Desktop.
Save thinkfreshnick/c882d298165365818d0c02cd5ac92c37 to your computer and use it in GitHub Desktop.
Sitecore wrapper example
public class HomeItem : CustomItem
{
public HomeItem(Item innerItem) : base(innerItem)
{
}
public int NewsItemLimit
{
get { return Convert.ToInt32(this["News Item Limit"]); }
}
}
HomeItem home = new HomeItem(Sitecore.Context.Item);
int newsLimit = home.NewsItemLimit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment