Title: Move Folder page contents from one page to another easily? Post by: Jeff M. on August 28, 2019, 01:01:09 pm Hi All,
I have a situation where I need 2 pages in a folder that are identical (almost) but serve different purposes. What I don't want to do is write two different dialog blocks to handle them. Normally I would probably have them in one page with a toggle but that isn't clear enough on this application so I definitely need two pages in the folder. My question - is there an easy was to move the dom contents of a page to another page (and back) according to which page has been clicked? Effectively changing the parent id of the a dom container object in the page 1 to page 2. I would expect I would need another container object to keep each page valid, eg: FOLDER myfolder PAGE page1 VBOX page1_root VBOX page_contents -- all the stuff I want END -- VBOX page_contents END -- VBOX page1_root END -- PAGE page1 PAGE page2 VBOX page2_root END -- VBOX page2_root END -- PAGE page2 END -- FOLDER So attach the node page_contents (or all the children of page1_root) to page2_root. I would appreciate any help on this as it is a very large dialog block I would need to duplicate just to make it look better. Title: Re: Move Folder page contents from one page to another easily? Post by: Jeff M. on August 28, 2019, 03:15:10 pm Don't worry, it was simple enough to write a function to do it.
Incase anyone ever needs to: Code and then: Code
|