I have no significant experience (well, none at all actually!) of using the DotNetNuke API but it looks like it could save my bacon, so would appreciate some pointers. I have raised this overall issue in the Administration forum but I am now thinking that using the API could make this a lot easier on me.
I need to copy around 200 pages from a production PROFESSIONAL server to a development (will become production) COMMUNITY EDITION server. I won't bore you with the details but Export/Import is cumbersome, to say the least. However, I have full access to the SQL databases on each one and have a plan.
The pages in question are all of the same layout. They use about 4 custom modules, which are mostly data-driven based on their tags (taxonomy). One of the modules, however, is a simple HTML module with the main content of the page.
My new plan is as follows:
- Export/Import one of the pages to the new server. That acts as my "template"
- Write code to create the other 200-odd pages by copying the template page (I believe I use ModuleController for this)
- Update the appropriate table in SQL to import the HTML-based content to each of the pages, for the single HTML module
- The custom modules on the page should work as-is, since they will pick up the tags for each page (which I will import somehow)
I started tinkering with this yesterday and successfully created a new page. However, the content sucked into the new page only appears to include the HTML module - the layout doesn't seem to include the custom modules from the source page.
Before I delve in further here, is the copy method supposed to import modules too (from the source page to the target page)?
I don't have immediate access to my code right now but wanted to validate if I am on the right path.
Thanks.
Mark