Copied to clipboard

Flag this post as spam?

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

  • Lee Kelleher 4010 posts 15743 karma points MVP 12x admin c-trib
    Aug 20, 2009 @ 18:25
    Lee Kelleher

    Display and Sort by "Publish at" date

    Recently, my client has been making use of the future publication ("Publish at") functionality for their content (articles and blogs). This has been working fine - all good.

    However the problem arose that those publication dates ("releaseDate" in Umbraco) aren't being use in the XML cache (umbraco.config), so I can't use/display them via XSLT - which I use for all my content listings.

    Initially I'd been using the @updateDate (followed by @createDate) to sort/display the content. But that presented it's own problem if my client was re-publish the entire site, or sub-section of the site ... (not that this happens often, but it can do).

    Ideally, I would like the "releaseDate" property to be included in the XML cache (umbraco.config), there's an open ticket about it on CodePlex - but even then I think Umbraco v4.1 would be the earliest we'd see it available.

    Until then, what are my options?

    So far my thought has been to create a new property called "Display Date" and ask my client to populate that field for every piece of content. But an extra field sounds overkill... unless it's the only option?

    Any other ideas?


    - Lee

  • dandrayne 1138 posts 2262 karma points
    Aug 20, 2009 @ 18:34

    I think a "news date" property is the sensible option here, and I'm not sure that I agree that something like this needs to be included in umbraco core, but thankfully for you those decisions are not mine to make!

    When I create a news system I always include a "release date" and sometimes an "archive date".  As far as the client is concerned it's not an extra field as updateDate and publishDate are populated automatically and most clients I've worked with don't really venture into the properties tab.

    Hope this helps,

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Aug 20, 2009 @ 21:57
    Thomas Höhler

    you can use a display date which can be filled automatically by some action handlers. Don't know the complete definition of your client, so in some cases it can be an additional option.


  • Jan Skovgaard 11264 posts 23595 karma points MVP 9x admin c-trib
    Aug 20, 2009 @ 22:20
    Jan Skovgaard

    As Dan mentions the extra field really is your only option in this case. And I agree that it is actually not overkill. In the old forum I recall to have seen the same question being asked where Niels also suggested to make an extra field to do it.

    I don't think it should be in the core either.


  • Lee Kelleher 4010 posts 15743 karma points MVP 12x admin c-trib
    Aug 20, 2009 @ 22:35
    Lee Kelleher

    I do think that if the fields have values, then both "releaseDate" and "expireDate" should be avaliable in the XML content cache (umbrco.config) - it opens up much more flexibility in the XSLT.  We're talking about an extra 66 characters per XML node (if they have a value).

  • Jamie Howarth 306 posts 773 karma points c-trib
    Jan 07, 2011 @ 12:36
    Jamie Howarth

    Hopefully someone finds this useful - short-and-sweet two-line XSLT helper method that gets Document.ReleaseDate for a given node.

Please Sign in or register to post replies

Write your reply to: