Forum


HomeHomePremiumPremiumDevelopmentDevelopmentInterfacesInterfaces
Previous
 
Next
New Post
8/12/2014 1:42 AM
 

Hello,

I'm trying to work out how to implement a copy function in a module that I'm developing.

I assume there's an interface to implement when a page is copied and the action setting for the module is set to copy/reference.

I am hoping one of Scott's videos over this but couldn't see it.

Best Regards,

Steve

 
New Post
8/18/2014 3:53 AM
 

Hello,

Apparently, the interface I need to use is iPortable, it has an import and export function.

Haven't tried it yet, but it looks reasonable.

Best Regards,

Steve

 
New Post
8/26/2014 5:21 AM
 
Hi,

OK so I tried uncommenting iPortable, but unfortunately it didn't, work.

When copying a page, the copy option on the action tab wasn't even enabled.

So back to square one.

Anyone got any ideas?

Steve

 
New Post
8/26/2014 8:22 AM
 
Further to my question, all I need to have passed in to the interfaces function is the moduleId for both the module that is being copied and the one one being copied to.Hope that's possible.Steve
 
New Post
8/27/2014 4:00 AM
 

Steve,

Sorry I am late chiming in here.  Supporting IPortable in your module means that you will implement import and export methods that will be fired when a user clicks on the "Import Content" or "Export Content" items on the module action menu.

These methods need to basically serialize and deserialize your module's data and/or settings.  Usually the serialization is done as an xml file.

When copying a page or creating a page template, I believe DNN will fire your module's export function.  I would need to do more testing on how the Copy module interacts with this.  This is a good tutorial topic!

Steve, have you done a baseline test of your IPortable implementation?  Make sure to indicate portable in the  supportedFeatures in your manifest.  Make sure your implementation works and debug it by clicking Export Content / Import Content on the action menu.

Once you know your implementation works.  Try copying the module while your debugger is attached to see if it enters your IPortable method.

 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopmentInterfacesInterfaces



Try FREE
30 days money back guaranteed