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
Getting the following error when trying to sort my umbraco tags by a date field.
System.Linq.IQueryable
Here's the code
@if (Model.Content.HasValue("newstags")) { var taglist = Umbraco.Field("newstags").ToHtmlString().Split(','); foreach (var tagpage in taglist) { var taggedContent = Umbraco.TagQuery.GetContentByTag(tagpage).OrderBy("Id descending"); foreach (var tagitem in taggedContent.Orderby("newsDate") ) { if (CurrentPage.Id != tagitem.Id) { var dateofnews = (DateTime) tagitem.GetPropertyValue("newsDate"); <li><i class="fa-li fa fa-chevron-circle-right"></i><a href="@tagitem.Url"> @dateofnews.ToString("MMMM d, yyyy") - @tagitem.Name</a></li> } } } }
Any thoughts?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Order By Not working with Tags
Getting the following error when trying to sort my umbraco tags by a date field.
System.Linq.IQueryable
Here's the code
Any thoughts?
is working on a reply...