Friday, February 3, 2012

Using the Umbraco Object in a Umbraco 5 Template

If you want to use the Umbraco object in Templates then you need to add @inherits RenderViewPage to the top of your template (View).  Its best to do this on a Master Template so you only need to add it once. 


If you don't do this you will get an error like CS0234: The type or namespace name 'Field' does not exist in the namespace 'Umbraco' (are you missing an assembly reference?)




No comments: