Live Copy and MSM Custom Configuration

Adobe CQ5 gives us the ability to easily create a new site, or multiple sites, based on an existing site through Live Copy. Multi Site Manager (MSM) will then allow us to easily manage the content and relationships between these sites.

Note: For more details regarding the Multi Site Manager and Live Copy, see http://dev.day.com/docs/en/cq/current/administering/multi_site_manager.html. MSM and Live Copy are much more powerful and complex than what we can cover in this brief overview. It’s highly recommended that all users read through the documentation.

What is Live Copy?
Live Copy is the creation of a new site based on the content and structure of an existing site. Changes or additions to the main site can then cascade down throughout Live Copies. When used to its full potential, this is a very powerful tool that can simplify management across a large number of sites with little effort.

For example, let’s say we want to create a mobile site based on our main site. Additionally, we want this mobile site to maintain itself whenever changes are made to the main site. We want the mobile pages to update themselves, create themselves, etc. The only difference between the main site and the mobile site will be the design. With a little configuration and I do mean “little”, Live Copy will be able to handle all of this for us.

MSM Custom Rollout Configs
If we run Live Copy straight out of the box, we get an exact duplicate of our original site. That can be good, but probably doesn’t fulfill a project’s requirements. Chances are we’d need to change the template and resource types of our Live Copy pages. These changes can be made using rollout configurations in Live Copy. With a rollout configuration, CQ can automatically create a new mobile page anytime we create a new page in our main site, taking the exact content from the new main page while still using the mobile site’s designs. We could always do this manually, but configuring our Live Copy rollouts will automate the process—and it really isn’t too difficult.

Rollout configurations can be found by navigating to etc/msm/rolloutconfigs. Here, we can see some of the out-of-the-box configurations files as well as some custom Geometrixx configurations. New rollout configurations can be created from scratch or by copying an existing layout and altering it to our project’s needs.

The Trigger Property
The Trigger Property will tell CQ when to use specific configurations. We can specify that a particular config is used only on a site’s initial rollout, or we can call a configuration. There are four types of triggers:

  1. Rollout (performed when a page is rolled out)
  2. Modification (performed when a page is modified)
  3. Publish (performed when a page is activated)
  4. Deactivation (performed when a page is deactivated)

For more information regarding these triggers, refer to the official documentation.

The editMap

editMap

In the editProperties node of our rollout’s jcr:content, we can find the editMap property. This is where we need to declare any changes we want made to any property values during the Live Copy. The editMap is where we declare all of our desired automation using regular expressions. An editMap property can have multiple declarations, each one separated by a comma. As an example, consider the following declaration:

The above declaration is rather straightforward. If a page has a sling resource type of “testlivecopy/components/templates/base,” we change the resource type to “testlivecopy/components/templates/mobile/base” for its Live Copy.

Let’s look at one more example, taken from the Geometrixx Outdoors Mobile Rollout Config:

The above declaration is a bit more complex and much more powerful. Any campaign path property of “/content/campaigns/geometrixx-outdoors/banner,” “/content/campaigns/geometrixx-outdoors/products” or “/content/campaigns/geometrixx-outdoors/article” will have “_mobile” added to the end of the path.

Blueprint Control Center
Managing a number of sites may become a burdensome task, even if the sites are all Live Copies. The Blueprint Control Center (MSM Control Center) can help us stay organized with all of these Live Copies. The Blueprint Control Center is located in the Tools section of your site admin.

blueprint-control-center

Here we can get a detailed overview of all of the Live Copies that a specific site has, as well as detailed information on each page of each Live Copy. We can see if the Live Copy capabilities of a specific page have been turned off, if the page has been altered and currently has different content from its Live Copy, or whether a page is a Live Copy at all. We can also manage our Live Copies from within the Blueprint Control Center, creating, removing or re-rolling them.

Component Inheritance
As another demonstration of the power of Live Copy, we can manage it at the component level. On a Live Copy page, we can use the Live Copy tab to disable or enable Live Copy on each component of the page. Each component of a Live Copy will contain a clickable lock icon in the top left of the component. Unlocking the component will cancel the component’s inheritance. The rest of the page can continue to receive updates from changes to the original, while the unlocked components will basically live on their own, ignoring any Live Copies they may be attached to. To renew the component’s inheritance, we simply click the lock again.

locks

Power from Experience
The best way to really unleash the power of Live Copy is through experience. The phrase “practice makes perfect” really applies here. Have a look at some of the rollout configurations provided with Geometrixx. Experiment with the triggers. Create test sites with test rollouts. Finding the perfect rollout and setup might take a few tries, but in the end, the power of Live Copy will save you time—easing some of the tedious and oftentimes difficult tasks of managing multiple sites.