Copied to clipboard

Flag this post as spam?

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


  • Michael Hyldsgaard 64 posts 124 karma points
    Aug 01, 2011 @ 21:41
    Michael Hyldsgaard
    0

    Best practice on archiving news?

    Hi there!

    I have a content folder containing all my news. I would like to have some sort of scheduled task regularly iterating throgh the folder examining if any news have expired (according to an "EndDate" value on the news).

    If the news item has expired I want to copy the item to an "archive folder" and keep the item published.

    Whats the best practice for this action?

    /Michael

  • Paul Blair 466 posts 731 karma points
    Aug 02, 2011 @ 01:13
    Paul Blair
    0

    Hi Michael,

    How I have handled this in the past is not to move articles but just to have seperate macros, one that views current articles and another that selects articles with a EndDate < today.

    If you want to move to a seperate archive section this could be done through the API and scheduled tasks. Sorry, I don't have any code examples for this. The blog package has code for creating data folders and moving the blog article to the date folder - what you want is similar to this. For scheduling have a look at a package like: http://our.umbraco.org/wiki/reference/packaging/package-actions/community-made-package-actions/add-a-scheduled-task

    Cheers

    Paul

     

Please Sign in or register to post replies

Write your reply to:

Draft