by
keakie » Tue Jul 04, 2017 4:33 am
I suspect you could use existing couch tags, albeit the solution would be quite simple.
- Code: Select all
<cms:set page_to_clone="<cms:gpc 'p'/>"/>
<cms:pages masterpage='masterpage_to_clone.php' page_name=page_to_clone limit='1'>
<cms:db_persist
_invalidate_cache='0'
_mode='create'
_masterpage="masterpage_to_clone.php"
k_page_title="<cms:show k_page_title/>"
editable_1="<cms:show editable_1/>"
editable_2="<cms:show editable_2/>"
/>
</cms:pages>
I can't see any obvious problems with this. You could place the code inside a php file and then direct users to the url e.g
http://www.site.com/clone_page.php?p=page-to-clone. To complete the functionality you could redirect the user back to the original page after the <cms:db_persist> closing tag. I'm sure @kk will have a cleaner, more secure and more thought through. solution though!