Template migration

Did someone say "Bulk Template Migration"? Continue reading for a mini tutorial on how to accomplish this in the fewest mouse clicks possible.

By Zaigham Rana
January 17, 2006
Template migration

Hiya all!

I am here with a little tip on quick bulk migration of templates in MODx. (Also asked by Wendy here).

Say you have 1,000 documents or more, and have multiple templates, and you are considering a re-design of a whole website! OUCH! Its a pain to change 1,000 documents' templates via traditional editing facility.

Don't worry, MODx provides you a very easy way to do this tedious job in very short time. To find out how, read the tutorial below:

Case1: You have 1 template for all 1,000 documents.

Solution:

1. Go to Administration -> System Configuration, scroll down, and you will see "Default Template" and a drop down list containing all of the templates along with 2 radio buttons having the labels:

  • Reset all pages to use Default template
  • Reset only 'Default Template' pages

2. Select the "New Template", and select either one of 2 options, hit the save button and refresh the site, and you’re done! (I assume that your new template's name is "New Template")

Case2: You have multiple templates.

Solution:

1. Goto Administration -> System Configuration, scroll down, you will see "Default Template" and a drop down list containing template list along with 2 radio buttons having the labels:

  • Reset all pages to use Default template
  • Reset only 'Default Template' pages

2. Select the name of template, previously assigned to some documents (which you want to change into a new one), and hit save. (Caution: DO NOT select any of the options below.)

3. After the page reloads, repeat step 1 again, and this time you will see the options like this:

  • Reset all pages to use Default template
  • Reset only 'old template' pages

(I assume that your template title is "old template")

4. Now select the "New Template" (the one you newly designed and going to replace "old template" with) from the list, and choose the second option:

Reset only 'old template' pages

(I assume that your template title is "old template")

Hit the save button and refresh the site, and you’re done!

You can repeat these steps for any remaining template migrations.

"MODx really blows me away." , Ryan Thrash.

Its true!

anyways, until next time... take good care of yourself and the people around you.