Copied to clipboard

Flag this post as spam?

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


  • Phil 3 posts 23 karma points
    Aug 11, 2014 @ 11:16
    Phil
    0

    loop .OrderBy unpublish date

    I've created a simple loop below and I want to order this loop by its umbraco "Unpublish at" property. In my head it should be this :

    @foreach (var example in CurrentPage.Children.OrderBy("expireDate"))
    {
        //Do Stuff//
    }
    

    This would be similar to Umbracos createDate but isn't working. Anybody got any ideas? Thanks

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Aug 11, 2014 @ 11:22
    Jeroen Breuer
    0

    Have a look at the App_Data\umbraco.config file. There you can see the attribute names of the available data. If there isn't an expire date perhaps it's named something else.

    Jeroen

  • Phil 3 posts 23 karma points
    Aug 11, 2014 @ 11:31
    Phil
    0

    Thanks for the reply. I see a "createDate" and a "updateDate" but nothing that could be linked to the unpublish date property.

    I'm assuming this means that it is not a standard feature?

    Is there a way around this issue? Other than creating a Date Picker property for the order and then unpublishing them manually?

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Aug 11, 2014 @ 11:33
    Jeroen Breuer
    0

    You could try and find the unpublish date with the content service, but it's not cached so it's not good for performance.

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft