Is it possible to add a future status remap to a page?


(Ryan Archer) #1

I just want to know if it possible to add a future status remap to a standard page or form asset?

I just want to redirect a form to another page when entries for the competition are closed.

 

I know this can be manually done but hoping to find an automated way to do it out of working business hours. Is this possible?


(Luke Wright) #2

Hi there,

 

As far as I know there is no specific Scheduled Job (nee Cron Job) for "Future Remaps", and in any case, existing asset lookups override any remaps for the same URL.

 

There are "Future Lineage" Scheduled Jobs which can let you delete and create links at a certain time, but I can't think of any easy options (doubly so if you're on an earlier version than Matrix 5.1). Most difficult would be to ensure the two scheduled jobs you'd need would run in the correct order, to avoid a "web path already exists" error. I'm not sure if there is any guarantee on that.

 

In Matrix 5.1, you could set one Scheduled Job to delete the link, then attach a trigger to that link deletion to move a new asset into the same place (using the "Action on Other Assets" option brought into 5.1). In both cases you'd have to make sure the web path of the new page is correctly set.

 

Does it have to be a different page (and URL) that it goes to? If you want to use the same URL, you might be able use Future Status jobs to switch which content containers get shown to the public after a certain time, replacing the form with a "sorry we're closed" message.

 

If it has to go to a different URL... I can't remember, if you have a Nested Content content type that contains a redirect page, whether that redirect gets honoured. That might be another option, but I am ready to stand corrected on that.

 

Just throwing a few possibilities that might work, but in the end it unfortunately doesn't seem to be a trivial thing to do through Matrix itself.


(Ryan Archer) #3

Thanks @Luke, I suspected there was not going to be a 'silver bullet' solution. We are yet to upgrade so I think I will just have to do it manually for now.

The reason I want it to redirect to the parent page is so that I don't have to modify two pages (the form page and the page it is linked from).

 

I was hoping to remove the link from the parent page and put up a alert message (already accomplished using safe edit and future status), then redirect the form page to the parent one. Just a bit more efficient I'd expect.

The form is not nested.

 

Perhaps I could safe edit the parent form asset and then edit the 'Page Contents' bodycopy and then set a future status to approve it at a later date (it's a custom form - I could just comment out the form elements and leave a message up).

Maybe this is the easiest way to do it. I'm just not entirely convinced that the safe edit would honour a custom form's Page Contents....


(Bart Banda) #4

One thought is to set a metadata value when the form has expired and print conditional content using that value. The value could change using a trigger using metadata time and listening out for a metadata date field, when expires, sets the other metadata field to "Expired" and then prints conditional content on the form.