Implementing iPortable for page copying
Last Post 02/27/2015 10:04 AM by Stephen. 3 Replies.
Author Messages Not Resolved
Stephen
Nuke Pro
Nuke Pro
Posts:86


--
02/26/2015 8:12 AM  
Hello,

Does anyone know how to use iPortable for copying complete pages?

I've implemented iPortable, but when making a page copy only the ExportModule function is called. That gives me ModuleID for the module being exported from but I need the ModuleID of the module that is created on the new page. The module is created ok, I just can't work out how to get it's ModuleID.

Best Regards,

Steve
Joseph Craig
DNN MVP
Posts:11667


--
02/27/2015 6:29 AM  
Steve,

Our friends over at DNNHero.com and Scott Wilkinson have just published a definitive set of video tutorials on how to implement iPortable.

I don't understand why you need the target ModuleID. That won't be known until you use the exported file to create the new page. DNN takes care of that for you. Note that the module must be installed separately on the other system before the exported file can be used. It simply creates a new instance of the module, but the module must already exist.

Joe Craig, Patapsco Research Group
Complete DNN Support
Stephen
Nuke Pro
Nuke Pro
Posts:86


--
02/27/2015 9:44 AM  
Hi Joe,

Thank you for your reply and for mentioning Scott's video series. I have already seen the videos and they are excellent but I still haven't been able to see how to implement a page copy. But your reply made me think :-)

I would like to copy the page to the same site. But when I use 'Page Copy', only the ExportModule function is called. I haven't actually written any code to write a file from the Export yet. So I am guessing that explains why the ImportModule function isn't called, there isn't anything to import so DNN doesn't bother to make the calls.

So presumably, if I write some code to export a file, DNN determines where to save the file to and then calls the Import module for each file found.
Does that sound reasonable? I will try writing a file out and see if it works.

Previously, I just tried setting breakpoints on the two iPortable functions and saw that only the Export Module was called, that's why I was confused, I couldn't see how to perform the import.

Thank you for your reply once again.

All the best,

Steve
Stephen
Nuke Pro
Nuke Pro
Posts:86


--
02/27/2015 10:04 AM  
Hi Joe,

I've just tried returning something from the ExportModule function, the ImportModule function is now being called.

Thank you so much for your reply once again :-)

Steve


---