Jump to content

Temporary pages, versions, etc.


SteveB
 Share

Recommended Posts

I'm simplifying but imagine a site about people and groups. Every person and every group is a Page. We plan to do this for a long time and periodically update the people and groups.

I'd like to be able to store a "snapshot" of a group, including the people in it, and be able to look at that at a later date. I could iterate through the properties of the group and the person pages associated with it and apply some variation on this page to array technique to store current values in a datastructure of some kind to be archived in a table or file. I think it's a reasonable simplification to assume the templates for these pages will not change.

Later I'd like to reconstitue the XYZ group as it was on it's 10th anniversary when we stored a snapshot. In order to be able to display it using the same tools I use to display current info, I'll iterate through the archived data structure and create Pages, then render the reconstituted group page. Assuming many of these people are still current on the site we might also show links to their current selves or show comparisons.

In the not too distant future we might have a built in capacity for versioning of Pages but for now I could certainly save changeable field data externally. I'm just not sure how to best manage the brief life cycle of these temporarily reconstituted pages.

They have to coexist with the current data, but not clash (names, ids). They have to be deleted when we're done with them. Can we make a bunch of Pages on the fly, render them and never, actually have anything about them stored in the database? Anybody done anything like this? 

FYI, somewhat relevant thread: http://processwire.com/talk/topic/4420-page-list-migrator/

Thanks

Link to comment
Share on other sites

Thanks Adiran. I hadn't thought about the clone module but that could work if I'm careful not to make a new clone unless something has changed. I could make a hash and append that to the clone's name. Groups have a PageArray of people so I'd have to make sure that clones of the people exist and then update the group clone's PageArray to point to them. Might actually work.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...