-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preview future state #7
Comments
Hey @mikenz, Chris (@flamerohr) mentioned that you might have future state working in a custom version of advancedworkflow or your CMS? Is that something you can share, at least as a starting point? We're looking to extract embargo/expiry from advancedworkflow into this module here, and future state preview came up again in this context. |
Sure do.... you're going to love working with this code :-) This would end up in
Regarding virtual pages, our virtual pages work differently to standard ones. When the source page is published it publishes all the virtuals of it. So the above code is written with that assumption. Our publishers don't want to have to embargo the source page and all the virtuals of it. |
Further to above, A future state url looks like this: http://www.example.com/test-page?stage=Stage&ft=20171130T1300Z Using this form field on the bottom of the PublishingSchedule tab: https://github.com/silverstripe-terraformers/advancedworkflow/blob/development/code/formfields/FutureStatePreviewField.php As an easy way to generate the link. |
Hah thanks Mike, that's about the terrifying shape of code I expected ... the future is a scary place :D You wouldn't happen to have unit tests for it as well? |
Yes, thanks to @frankmullenger and @flamerohr, you'll need to update some |
oh neat, the (partially) traumatic memories :D |
@flamerohr your original queries were much simpler: https://github.com/silverstripe-terraformers/advancedworkflow/blob/development/code/extensions/WorkflowEmbargoExpiryExtension.php#L771 |
fair enough :) |
Allow an author to set a date in the preview panel and browse through the site at that state, including any embargo or expire actions applied
We've attempted this before with the SiteTreeFutureState extension in the old
silverstripe-workflow
module.The text was updated successfully, but these errors were encountered: