**NOTE: As of July 2014, we are no longer working on the ProStores platform. Please contact us if you would like to migrate your store to BigCommerce.**
The point of this article is safety. When working on your website you always run the risk of damaging the look and feel that you or your designer has gone to great lengths to achieve unless you’re being careful and making backups before making changes. On that same vein, ProStores has a built-in system to help you with this: Template Baselines.
A baseline is a saved backup of a particular template and a good set of them should be considered your insurance against a broken site should the changes you make on your own cause unexpected problems. By default, when you go to your site’s Page Template Manager and click on a template name in order to edit it, you get the following popup dialog box:
Let’s look at this for a moment because this could be the last time you ever see this popup, depending on how you choose to proceed. We recommend that you change this popup to look like this:
Notice we’re saying to not use this popup to control your baselines. Here’s why: This popup, when left with the default settings, will come up every single time you go to edit a template from the Page Template Manager, whether you need it to or not. The possibility that you will accidentally overwrite a useful baseline with a broken copy by simply trying to get past this popup quickly is an unecessary risk that can and (in our opinion) should be avoided. If you choose the same settings as shown above (uncheck the box to Save a baseline, check the box to not show the message and change the dropdown menu to say “again”) then you can have manual control over baslines on your site without taking the risk that they could be accidentally replaced. The rest of this article will assume you’ve made this change and will focus on manually setting and retrieving baselines.
To set a baseline manually, first you should open up the Page Template Manager. Check the box next to the template you would like to save (note: you should do this at least once for all properly functioning templates on your site – that way if anything at all goes wrong you know you at least have a working copy to revert to) and then select Set a Baseline from the More Actions dropdown menu. For example, in the following image I am choosing to set a baseline for the Product List template:
When you choose to set a baseline, the page will refresh and ask you to confirm your choice. Be sure that you actually do want to do this for the template(s) selected (you may set a baseline this way for as many templates at one time as you’d like) and click the Set Baseline button. A note will be placed on that template when you view the Page Template Manager so you can see on what day and at what time the baseline was set. You can also see when you last edited the page in question. It is a good practice to replace previously set baselines with new ones if you’ve changed the page without causing any problems or errors. Remember, a backup is only useful as long as it contains accurate, recent information.
Finally, there will come a time when you need to retrieve a baseline in order to fix a problem. You may have accidentally pasted the wrong template before hitting the Publish button or perhaps you published a template with broken or missing code and cannot determine what was done incorrectly. In either case, you’ll be happy that you took the time to make a baseline when things were working properly. To get a template back to how it was working at the moment you set a baseline, first open your site’s Page Template Manager. Find the template(s) in question and check the box(es) next to them. Next, select Revert to Baseline from the More Actions dropdown menu as seen in this example:
On the page that loads you will be asked to confirm this decision. Be sure you’re restoring only templates you wish to restore and then click the Revert to Baseline button. The template(s) will be restored exactly as it was the moment you initially set the baseline.
When used properly, baselines give you more freedom to experiment on your site without needing to fear the possibility of causing permanent damage. Just keep in mind that while using the Advanced Editor or Basic Editor to edit your templates you are working on the Header and the Footer in addition to the template you’ve selected so it’s a good practice to set baselines on those templates even if you do not intend to change them in any way.