one page to rule them all
Permalink
curious how I might accomplish this: I'm looking to create a template that is basically an amalgamation of the whole site -- maybe a way to scrape through all the pages & pull all the active content areas? was thinking I might do it as a single page template but an alternative would be to load the sitemap urls into javascript & have the client loop through that array & push the content of each page into an iframe or something.
thoughts?
thoughts?
1. Iterate through the sitemap and grab all the collection IDs. Maybe you can take code from the Page List or Auto-Nav blocks to get things this far.
2a. Render each page. I've seen examples of people rendering blocks, and I'm sure pages might work in a similar way:
http://www.concrete5.org/community/forums/customizing_c5/how_to_cal...
2b. I'm not sure what data or methods you get back once you have the cID for a page to work with, but perhaps it gives back its blocks by area? In that case, you could parse through, get the cID for every block in each page in a given area, then follow the example from the link above to render all of those blocks yourself, or to (possibly) create a page instance or a block area from scratch and tell it to render?
I'm sure there's someone out there who is more familiar with the APIs and how pages work. You can get some help by looking under the concrete/models directory and seeing what methods are exposed by each class. Looking at the source code for the auto-nav or page list block might be a great example for seeing how to get all the pages and get the objects for each one