Skip to content

Instantly share code, notes, and snippets.

@jkarsrud
Created August 22, 2013 14:36
Show Gist options
  • Save jkarsrud/6308030 to your computer and use it in GitHub Desktop.
Save jkarsrud/6308030 to your computer and use it in GitHub Desktop.
Setting up and using the UmbracoHelper inside a custom controller
public class HomeController : Controller
{
private readonly UmbracoHelper _umbracoHelper = new UmbracoHelper(UmbracoContext.Current);
public ActionResult Index()
{
var node = _umbracoHelper.TypedContent(1000);
return View(node);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment