We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17851
    • 213 Posts
    I’ve got an online signup form (eForm) that should change once it’s too close to the event to register online. So once it’s too close, it should display a text message instead of the eForm. I could get it to expire (using the unpublish date) and create a new document that will become published at the same date/time, but I want to keep the alias the same so that external sites that reference the URL won’t break. Any ideas?
      Mark Macatee
      President
      Power 10 Solutions
      http://www.power10solutions.com
      • 3749
      • 24,544 Posts
      Here’s a quick thought (probably not the only way to do this):

      Create a Template Variable with the event date and have it set correctly for each event page.

      1. Put the eForm code in one chunk.
      2. Put the "Sorry, you’re too late" message in another chunk.
      3. Use a snippet on the page to evaluate the date and select which chunk to show (using $modx->getChunk()).

        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
        • 17851
        • 213 Posts
        thanks bobray, that thought had occurred to me. hmmm, anybody else?
          Mark Macatee
          President
          Power 10 Solutions
          http://www.power10solutions.com
          • 15082
          • 195 Posts
          Haven’t tried it myself but...

          Assuming you’re using Evolution, can’t you set the config setting (section FURLS) "Allow duplicate aliases" to on and create an document with the same alias?

          Would be interesting to hear if this works, if you’ve tried that wink

          Greetz
          JUSI
            • 17851
            • 213 Posts
            Not using Evo or Revo yet, but this setting IS available in 0963 as well (allow duplicates). I had forgotten about it since I always set it to use unique aliases. I’ll try this. Thanks for the reminder jusicgn
              Mark Macatee
              President
              Power 10 Solutions
              http://www.power10solutions.com
              • 15082
              • 195 Posts
              I’m curious if this works. So any feedback would be great!

              Greetz
              JUSI