Creating Numbered Item Versions in Sitecore

Rachel Duncan
March 28, 2018
Sitecore

If you’ve ever had to manage or edit content for a company that needs changes on a daily or weekly basis then being able to use versions in Sitecore is a godsend. This simple tool allows you to create a massive amount of changes ahead of schedule thereby keeping you ahead of the curve.

In this simple step by step guide I’ll explain what a numbered version is and I’ll also guide you through:

  1. Adding a numbered version
  2. Comparing versions
  3. Auto publishing your versions
  4. Removing versions

Numbered versions – These are just multiple versions of the same item in the same language. For example if you are offering a special discount on one of your products you can create a new version of your product that displays this offering. Then after the promotion has ended you can simply switch back to its original version. You can do this manually or by using auto publish which we will cover later on.

Adding a numbered version:

Navigate to the desired item in Sitecore you want to add another version to. Notice on the right hand side of the screen it displays how many versions there currently are of the item.

Version Number

Once on that item click on the VERSIONS tab as shown below.

Versions Tab

Click on the Add link

Add Version

After you click add you’ll notice that the version counter has changed. Previously where it only displayed a 1, you will now have 2 present

New Version

If you click on that arrow it will display to you when each version was last modified and who modified it. You can also add another version directly from this dropdown without ever having to click on the versions tab if you chose to do so.

Version Detail

After you have made all the changes you desire on your 2nd version and you’ve saved it we can now….

Compare Versions:

Comparing versions is super simple and a great way to make sure that all the changes you want accomplished are in place before you publish the new version. Navigate back to the versions tab in the content editor and click on the compare link.

Compare Versions

A popup will display that allows you to compare the two versions in two different ways

One column – displays the differences between the versions within each field by highlighting what is different and crossing out what has been removed between the two.

Version Compare Side-by-Side

Two columns – A side by side view showing both versions and highlighting the differences between each field.

Compare Version Differences

If you are happy with your new version and you don’t need to set it up to publish at a later time you can now publish your second version. You can always go back to the first version by updating the publishing times via the change button. We will cover how to use the change button under the auto publishing section below. Remember if you have workflow setup you will need to make sure and put your new version through workflow or it will not publish at the set time.

Auto Publishing Versions:

With Sitecore you can turn on auto publishing and let the beauty of it whisk your cares away. Well maybe not all of your cares. But who wants to be up at midnight making sure that the 10% discount to the pack of pull-ups starts when it’s supposed to? No one, that’s who! With auto publish and versions you don’t have to be that late night content warrior anymore. 

After your versions are set up and you’ve saved all your changes, click on the Publish tab in the content editor. Get ready to meet your favorite new button, the Change button.

Remove Version

As you can see in the image above once you click the Change button you are presented with this popup. It allows you to set the start and stop times for each version of your item. So if you want to run a 24 hour sale that starts at midnight here is where you’ll set it all up.

Our first version has a publishable from date but not a publishable to date, that’s because after the second version expires we want the first version to once again display on the site. Once all your times are set click the OK button and save. That’s it you are ready to go and so is your content. Keep in mind without auto publish you will still have to manually publish your new versions even if you set up the times via the change button.

Removing versions:

If you no longer have need for a version or it has just become so outdated that updating that version would be more pain than it is worth here is how you can easily remove old versions. Click on the item in Sitecore that you want to remove the version from. Select the version you want to remove via the dropdown.

Version Number

Then simply click on the versions tab and then select the remove link.

Remove Version

A popup will display asking you if you are sure you want to remove the specific version you are on. Provided that you do simply click ok and your version will be removed.

Confirm Version Removal

Now that you are a master of versions your customers will get access to promotions on time and maybe you’ll get some extra sleep!

comments powered by Disqus

STRATEGIC PARTNERS