Reputation: 297
I am trying to get the value of a custom property (isFeatured). I am working against the current page.
@inherits Umbraco.Web.Macros.PartialViewMacroPage
<div id="featuredpartnerwrapper">
@{
var page = Umbraco.TypedContent(1092);
}
@foreach (var child in page.Children)
{
@child.Name<br />
@child.GetPropertyValue("isFeatured")
}
</div>
the isFeatured property never is rendered
Upvotes: 1
Views: 4172
Reputation: 297
This code works - but you have to spell the property alias correctly -
@inherits Umbraco.Web.Macros.PartialViewMacroPage
<div id="featuredpartnerwrapper">
@{
var page = Umbraco.Content(1092);
}
@foreach (var child in page.Children) {
@child.Name<br />
@child.isFeatured
}
Upvotes: 2