View Article
written by Ryan Morgan, with 0 Comments
Publishing Content with Portal Templates and the Site Wizard Feature

In order to get around the lack of workflow and versioning in DotNetNuke, you can take a more traditional style to managing content and have a local version of DotNetNuke where you manage your content and then post your content using a Portal Template and the Site Wizard.

To start, manage your content using a local or staging version of DNN. Once you have your content where you are comfortable with it and would like to post to your production version, to go the Host>Portals and click Export Portal Template.



Next, choose the website you are working on in the Portal dropdown, enter “test” for your filename, enter a short description and check the “Include Content” checkbox then click Export Template. You’ll want to copy down the location that DNN tells you where it stored your file so that you can go grab the file from there. In my case, the file is stored in the c:\Arrow\DNN482\Website\Portals\_default folder.



If I navigate to that folder with Windows explorer, I see that there are two files there: test.template and test.template.resources.



If you were to open up test.template, you’d see that this is simply an XML file with the structure of the pages, modules and content for your site. If you were to rename test.template.resources to change the file extension to test.template.zip you could open it up as an compressed zip file and see that it contains all of the files that are located in your portal’s file system.

Now that we have a portal template and the files from the file system, we can simply copy these two files to the /portals/_default folder of the site where we’d like to publish the content and follow these simple steps to update the remote site with your portal template.

Go to Admin>Site Wizard

  1. Click Next
  2. Check “Build your site from a template”
  3. Select the template that you uploaded
  4. Check Replace to replace existing content with your new content
  5. Click Next
  6. Click Next until you are finished
  7. Click Home to reload your site’s updated content and navigation structure

Things to Note:

First, note that there is no undo! Once you replace your site’s contents it’s gone. Second, the export process does not export the content of all modules – particularly third party modules. The reason why is that third party modules need to implement the iPortable interface in order to have their modules’ content participate in the export process. The process will still have a record of the module it will just not include the contents of the module. Since most of your site’s content is made up of Text/HTML modules, this shouldn’t cause too much of a problem. Lastly, the export module does not include module definitions. What that means is that if you use a non-core module on your development environment, you’ll need to install the module into your target portal before you upload the template for the template to work correctly.

Happy Nuking

 

Leave Your Thoughts:

Name (required)

Email (required)

Website

Enter the code shown above: