I'm working on my first Umbraco 6 MVC website, its just took me about an hour to work out how to display a content managed image in a razor view. It cant be that hard, I must be missing something...
This is what I ended up with...
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = null;
}
<!Doctype HTML>
<html>
<head>
<title>blah</title>
</head>
<body>
<header>
<img src="@Umbraco.TypedMedia(Int32.Parse(Model.Content.GetPropertyValue("siteLogo").ToString())).GetPropertyValue("umbracoFile")"/>
</header>
</body>
</html>
... which seems overly complicated to just display an image? Surely this cant be best practice using razor?