Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi guys,
Does anyone know if i can do this is razor?
@{
var result = umbraco.ContentAtXPath(//News).Where( "Select the first News article where section = 'Sports'");
}
Section is a custom dropdownlist datatype for the News Document Type.
Hi Thomas,
Try this code:
var result = Umbraco.TypedContentAtRoot().First().Descendants().Where(x => x.DocumentTypeAlias.Equals("News") && x.GetPropertyValue<string>("section").Equals("Sports"));
Thanks,
Alex
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
UmbracoHelper Filter
Hi guys,
Does anyone know if i can do this is razor?
@{
var result = umbraco.ContentAtXPath(//News).Where( "Select the first News article where section = 'Sports'");
}
Section is a custom dropdownlist datatype for the News Document Type.
Hi Thomas,
Try this code:
Thanks,
Alex
is working on a reply...