what can I add to this to get pages that have a specific property values? more specifically, i have a property of type "Tag" on these pages and i want to get a list of pages that have a certain tag.
alternatively, is there a different/better way of doing this?
get pages with specific property value
If I have the following code:
var myPages= Model.Content.Parent.Children
.Where(p => p.IsVisible())
.Where(p => p.ContentType.Alias == "MyDocumentType")
.OrderByDescending(p => p.CreateDate)
;
Hi Matt,
Try to see this, I think it what you are looking for. http://our.umbraco.org/forum/developers/razor/54106-Razor-query-to-retrieve-pages-by-document-type-and-property-value
If you go directly to the solution there is an Razor strongly typed example.
Hope this helps,
/Dennis
Hi Matt,
Could you use the link as inspiration on how to get pages with specific property value.
/Dennis
I'll take another look at it monday but the first time I tried it was throwing an error.
is working on a reply...