Export template

May 20, 2009 at 5:50 PM

Hey Dave and the rest of you,

Any chance you could tell me how to export my 'custom' templates from my dev machine to production server???

 

TIA

Dave

Coordinator
May 20, 2009 at 11:31 PM

Hi Dave,

Do you just mean templates that you've customised in the Utilities/Temapltes section.. i.e. ProductDetail and ProdctList?

You can copy and paste the HTML from those templates to the same ones on your live site. Or you can create new templates (there's an 'Add' button on the page) and paste the HTML into those. Then simply assign those templates in the Product List module.

Another option, if the live site doesn't have a store installed yet, is to export your dev cart pages, including the one with the backoffice link on it, as page templates including content, and import them to the new site. NB Store is so well-made(!) that it will transfer all the templates and settings to the new portal.

Hope that helps,

Rob

Oct 1, 2009 at 12:20 AM

Rob,

I tried this and it didn't work!

I need to be able to build the store in a development (localhost) environment, and then move it to a production one.

 

John.

Coordinator
Oct 1, 2009 at 1:16 AM

Hi John,

The portal export is a way to get a basic copy of a site as a new portal, but it definitely won't do service as a staging/live production system. I've just done a test using 1.1.7 and you're right - the custom templates have not carried over. I'm sure it did on an earlier test!

The traditional staging/live development process also goes against the concept of running a live CMS in any case. I do see people attempting to do this quite often in the DNN forums, but it's ultimately unworkable. You can still use a local server for testing and developing code that you then transfer or implement on the live server, but it can't reliably be used for creating and transferring the actual content.

The way I work is that my staging server is for code-only - not content... and it is a duplicate of the live site, rather than the other way around. I test modules, create templates, troubleshoot, and do whatever I like to the test system and any code that is going to go live is moved across when it's ready. The live site is the one that is pure and well-backed up. The test site can be beat to death and destroyed as desired.

... I've just been doing some more tesing of exporting, and custom templates and settings from the back office can be exported by way of the Export function on the module action menu. Normally, things that are exportable by this method are also exportable in the portal templates. I'll make a note of this.

I'd still be extremely wary of overwriting a live store with an exported store. I think just copying and pasting the templates in would be preferable.. if that is even what you're trying to do. If instead, you're wanting to create standardised empty carts, then you could, as I've been doing, build up your own /templates/ManagerMenuDefault.xml file containing your own setttings and templates. Put that file into the PA or import it into an existing store buy way of back-offie>admin>import and it will add your own templates and settings to the store.

Hope that helps

Regards,
Rob