1
我正在研究我的第一个Umbraco 6 MVC网站,它只是花了我大约一个小时来研究如何在剃须刀视图中显示内容管理图像。它不能那么难,我必须失去了一些东西......在Umbraco 6 MVC网站上显示内容管理图像
这是我结束了......
@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>
...这似乎过于复杂,只显示图像?当然,这不能成为使用剃刀的最佳实践吗?
这更好,谢谢。 –