You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are looking into switching to Statamic for multiple sites but I'm having trouble finding a way of implementing a specific requirement:
Every year we add a bunch of pages, all nested under a single entry (e.g. "2023"). Pages from past years need to stay accessible.
These pages should only be accessible from a specific point in time.
That point in time might not be known when we create the pages.
There has to be a way to securely preview those pages before they are public.
I've been looking into some ways of achieving this without too much manual effort but none of them are ideal. Here's what I tried so far, with the main blocker in bold:
Add a publish date
This would work fine, except that we don't always know the date when we create the pages and it might change. This would require manually changing the publish date for each page individually, which is error-prone.
Use an action to change the protection or publish date
This would work for single pages (and multiple pages if each is selected manually) but it's too easy to miss a page, since actions can not be executed in the tree view. Ideally this would be done recursively so we only have to execute the action on the year's root page, but I haven't found a way to get all children of an entry in an action.
Add a default protection to the collection
This would require a separate collection for each year, which is a bit overkill since the sites are likely to last for over 10 years. Also, as far as I can tell, there is no simple way of duplicating a collection.
Does anyone have a solution to the above problems, or maybe a different way to achieve the requirements? We are proficient in Laravel, so writing an addon is a possibility.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We are looking into switching to Statamic for multiple sites but I'm having trouble finding a way of implementing a specific requirement:
I've been looking into some ways of achieving this without too much manual effort but none of them are ideal. Here's what I tried so far, with the main blocker in bold:
Add a publish date
This would work fine, except that we don't always know the date when we create the pages and it might change. This would require manually changing the publish date for each page individually, which is error-prone.
Use an action to change the protection or publish date
This would work for single pages (and multiple pages if each is selected manually) but it's too easy to miss a page, since actions can not be executed in the tree view. Ideally this would be done recursively so we only have to execute the action on the year's root page, but I haven't found a way to get all children of an entry in an action.
Add a default protection to the collection
This would require a separate collection for each year, which is a bit overkill since the sites are likely to last for over 10 years. Also, as far as I can tell, there is no simple way of duplicating a collection.
Does anyone have a solution to the above problems, or maybe a different way to achieve the requirements? We are proficient in Laravel, so writing an addon is a possibility.
Beta Was this translation helpful? Give feedback.
All reactions