How do you get full umbraco helper support in an RenderMVCController?
using Umbraco.Core.Models;
using Umbraco.Web.Models;
public class BlogAreaController : Umbraco.Web.Mvc.RenderMvcController
{
public override ActionResult Index(RenderModel model)
{
model.Content.GetProperty("title").Value
return View();
}
}
I only seem to get partial support i.e. x.GetProperty() but not x.GetPropertyValue()?
Full Umbraco Helper in a RenderMvcController
How do you get full umbraco helper support in an RenderMVCController?
I only seem to get partial support i.e. x.GetProperty() but not x.GetPropertyValue()?
//JC
Hi John,
GetPropertyValue
is an extension method. If you import the namespaceUmbraco.Web
, you should be good to go ;)If you also need something similar to
@Umbraco
in your MVC views, youcan initialize a new helper like this:Both the
UmbracoHelper
andUmbracoContext
classes also lives in theUmbraco.Web
namespace.Hi Ander,
Thank you!
John
is working on a reply...