Get rendered page code
Posted: Sat May 30, 2015 2:12 am
This topic was discussed a few years ago in another thread but I was unable to find a resolution/solution, hence the repost.
I'd like to know if there is a way to insert one page's rendered code into another. I know I can get the content blocks from a page using CGSimpleSmarty functions, but what I need it to get the complete rendered HTML code instead.
My use-case is this: I would like editors to be able to create pages with multiple visual components in any desired sequence. Each component has different types of content and slightly different rendering. I'm trying to set this up using child pages, where each child page is a different "module/component". Code on the parent page reads all the available child pages and inserts their rendered HTML in the sequence they appear in the child page tree.
I want to make this scalable by being able to add more templates for these child page modules which means that I cannot assume all the necessary logic to render the content blocks for all possible variations can be coded into the master page template - hence the need to be able to read the rendered code for each child page.
I hope all this makes sense and someone can recommend a simple solution. I'm fine with writing a UDT to do this if that's what it takes, but would appreciate being pointed in the right direction.
PS: I don't want to use the {embed} tag for this because of the iframes that will be inserted into the final markup.
TIA
-S
I'd like to know if there is a way to insert one page's rendered code into another. I know I can get the content blocks from a page using CGSimpleSmarty functions, but what I need it to get the complete rendered HTML code instead.
My use-case is this: I would like editors to be able to create pages with multiple visual components in any desired sequence. Each component has different types of content and slightly different rendering. I'm trying to set this up using child pages, where each child page is a different "module/component". Code on the parent page reads all the available child pages and inserts their rendered HTML in the sequence they appear in the child page tree.
I want to make this scalable by being able to add more templates for these child page modules which means that I cannot assume all the necessary logic to render the content blocks for all possible variations can be coded into the master page template - hence the need to be able to read the rendered code for each child page.
I hope all this makes sense and someone can recommend a simple solution. I'm fine with writing a UDT to do this if that's what it takes, but would appreciate being pointed in the right direction.
PS: I don't want to use the {embed} tag for this because of the iframes that will be inserted into the final markup.
TIA
-S