DotNetNuke – 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.

Preview

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.

Folder View

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

Square

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

  • Click Next
  • Check “Build your site from a template”
  • Select the template that you uploaded
  • Check Replace to replace existing content with your new content
  • Click Next
  • Click Next until you are finished
  • 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,

Ryan Morgan

Arrow Consulting & Design is a consulting firm based in West Palm Beach, Florida specializing in DotNetNuke, ASP.NET, SQL and WPF Development with a portfolio filled with local, national, government and global enterprise clients.

Case Studies: Click Here
Main Corporate Site: www.ArrowDesigns.com
DotNetNuke Community Site: www.ArrowNuke.com
Consulting Inquiries: Click Here
Skin Design/Conversion: Click Here
DotNetNuke Portfolio: Click Here

Advertisements

~ by dotnetnukeconsulting on August 9, 2008.

One Response to “DotNetNuke – Publishing Content with Portal Templates and the Site Wizard Feature”

  1. Excelente, thanks very much for your information, …

    excelente, muchas gracias por tu información, DNN es muy bueno pero instalarlo es una pesadilla

    Saludos desde Colombia, y de nuevo muchas gracias por tu ayuda!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: