We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5532
    • 251 Posts
    Hi There,

    Very new to Modx so please excuse me if this is an obvious question.

    We’re working on a site that will require (ideally) two publish dates and an archive date. The first publish date would place the content in one section of the site, the next publish date would move the content to another section and the archive date would move the content into an archive area.

    Is this possible with Ditto or Modx?

    Any help would be much appreciated.

    Cheers
      • 5532
      • 251 Posts
      OK - Rather than move the content, we’re wondering if after a certain date one of three categories could be applied to a page?
        • 3749
        • 24,544 Posts
        I’m afraid I can’t think of any easy way to do that. The only thing I can think of is to use Template Variables for the extra dates and then write a snippet or plugin that would move the documents (by resetting the parent ID). You’d either have to execute that code manually somehow (or use a cron job), or you could have the snippet check the TV dates against the current date any time the page is accessed and move it if the time was right.

        Maybe someone else will have a better idea.

          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 5532
          • 251 Posts
          Thanks for the reply Bob - do you know if that’s something PHx could do?

          Re cron jobs or having php check a TV each time the page loads: do you know how the publish dates work? I’m hoping it could just work in the same way but put the page under a different parent - of course I have zero php experience so wouldn’t know where to start.

          Will have a look at PHx maybe and see what it can do.

          Cheers, Ben.
            • 3749
            • 24,544 Posts
            Quote from: cms at Apr 27, 2009, 12:49 AM

            Thanks for the reply Bob - do you know if that’s something PHx could do?

            Re cron jobs or having php check a TV each time the page loads: do you know how the publish dates work? I’m hoping it could just work in the same way but put the page under a different parent - of course I have zero php experience so wouldn’t know where to start.

            Will have a look at PHx maybe and see what it can do.

            Cheers, Ben.

            I don’t hink PHX will do that (but I’m no PHX expert). The PHP to do what you want is not trivial and I think it will require writing directly to the MODx database to change the parent so it may take you a while. wink I think changing the effect of the publish date in the way you’re thinking of would mean hacking the MODx core (and would be overwritten every time you upgrade).

            Sorry I can’t be of more help.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 5532
              • 251 Posts
              Thanks Bob, guess I’ll flag the idea - sounds very complex.