Sitecore: Grouping Publishing Targets

This post is to provide a simple tool to cover an admittedly rare scenario, or at least currently rare. This scenario came about after working with a global Sitecore customer to design an architecture that covered the customers global footprint. The architecture allowed for multiple Content Delivery (CD) servers within each region for availability/redundancy purposes.

World Architecture

When designing this architecture, it became evident that there would be lots of different publishing targets created, which would become an annoyance to Content Editors, and also bring about the possibility of publishing targets being left unchecked. Editors in Asia however still needed to be able to publish to the Asian CD’s and not necessarily to other CD servers. With the above, the publishing dialog looked something like this;

Publish Dialog Before

The simple solution to this is to allow grouping of the publishing targets into logical groups, such as Asia; Europe; US etc. To achieve this is easy, and involved the following steps;

  1. Create a new template type to represent Publishing Groups. This contains a single multi-list for selecting publishing targets that it will represent.
  2. Create a folder to contain your publishing groups.
  3. Create the groups that you want to use, and add the relevant publishing targets into each.
  4. Override the ‘Publish.xml’ dialog to add in a new frame for publish groups
  5. Create your own class to sit behind the dialog form;
  6. Where publishing groups exist, then use those in place of publishing targets, else use Publishing Targets in the normal way

In the infamous words of Blue Peter, here is one I have made earlier: https://marketplace.sitecore.net/Modules/Sitecore_Publishing_Target_Groups.aspx

You can also find the source here: https://github.com/brooksyd2/sitecorepublishgroups

Once installed, this module will allow you to set up publishing groups to represent many publishing targets;

Add Group

This will then feed into the publishing dialog as below;

Dialog

This can be further refined through default publishing groups, settable in the same way as default publishing targets.

As stated in the beginning, a simple solution to a rare problem, but one I hope will help someone else in future.

Related Module: https://marketplace.sitecore.net/Modules/Sitecore_Publishing_Target_Groups.aspx

Related Source: https://github.com/brooksyd2/sitecorepublishgroups