Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Amir Khan 1282 posts 2739 karma points
    Feb 23, 2016 @ 22:06
    Amir Khan
    0

    Order Tagged List by Custom Property

    Hi,

    I'm working with the old tag query format so I can pull multiple tags. I'd like to order the tags by a custom property called "postDate", I can order by ID with the following:

    var oldTaggedList = umbraco.cms.businesslogic.Tags.Tag.GetDocumentsWithTags(@tags) .OrderByDescending(n => n.Id);

    But things like this don't work.

    var oldTaggedList = umbraco.cms.businesslogic.Tags.Tag.GetDocumentsWithTags(@tags) .OrderByDescending(n => n.GetPropertyValue("postDate"));

    Any ideas?

    Thanks

    Amir

Please Sign in or register to post replies

Write your reply to:

Draft