@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@使用 umbraco.NodeFactory; @使用umbraco.MacroEngines;
<ul class="rslides">
@{
var rootNode = Model.Content.AncestorOrSelf(1);
var items = (rootNode.HasValue("featuredSlides")) ? (Umbraco.Core.Dynamics.DynamicXml)rootNode.GetPropertyValue("featuredSlides") : null;
}
@if (items != null)
{
foreach(var item in items)
{
int id = Convert.ToInt32(@item.InnerText);
Node node = new Node(id);
var mediaItem = Umbraco.TypedMedia(node.GetProperty("picture").ToString());
int mediaHeight = Convert.ToInt16(@mediaItem.GetPropertyValue("umbracoHeight"));
int maxHeight = 700;
int height = (mediaHeight > maxHeight) ? maxHeight : mediaHeight;
var url = @node.Url;
<li><a href="@Umbraco.NiceUrl(id)"><img src="/imagegen.ashx?image=@mediaItem.GetPropertyValue("umbracoFile")&width=640"></a></li>
}
}
</ul>
我想知道@node 的发布状态是什么。我正在使用 umbraco 6.1.6
我已经尝试过类似var p = @node.GetProperty("published")
(publishedCount, publishedStatus ...) 但没有任何效果。
任何想法?
谢谢。