You are on page 1of 14

AEM MSM

 How to create a multi–lingual and multi-continent website


Blueprint is the structure of the website.


Skeleton of the website.
MSM enables you to use the same site content in multiple locations.
With MSM you can create content once and then use this content in
different areas which are called live copies.

MSM then maintains a relationship between your source and live


copies.
When you make changes to the source the changes are synchronized to
live copies.
You can make changes to live copies by disconnecting the live relationship
for individual pages.
Use case
MSM supports to reuse of content in multiple same-language sites.
National level websites and regional websites.
Multiple production versions.

Access MSM from UI


Creates Sites
Create Live Copy

View properties

2
References Rail

Tools->Sites->Blueprints

Rollout configurations
Rules that determine which properties will be synchronized

3
Difference between Suspend, Detach, Reset
Detach-Permanently removes the inheritance between live copy and
blueprint.
Reset-Remove all inheritance cancellation and returns the page to the
same state as the source page.
Reset page properties, paragraphs, and components.

Difference between Shallow and Deep


Shallow-The live copy of the single page.
Deep-The live copy of a page, together with the child pages.

Live Copies
Is a copy of a specific site with which a live relationship is maintained.
Synchronization is the transfer of content from source to live.
A live copy can be
Shallow- a copy of 1 page
Deep-The page together with child pages.
Rollout configurations are rules which defined which properties will be
synchronized when synchronization happens.

Rollout and Synchronization


A rollout is a central MSM action that synchronize live copies with their
source.

4
Blueprint Configuration
Any page can be used as the source of a live copy.
But MSM also allows you to define a blueprint configuration that points
to a source path.
It’s recommended to use this option, because
It allows the author to use the rollout option on a blueprint page.

The “Create site” option requires a blueprint.

In the create site wizard you need to select the Blueprint which you
created earlier.

5
You can select the Language and Chapters(Which are the pages)
You can select the checkbox “Live Copy” and Rollout configs

Standard Steps for using MSM


1. Develop the content of the source site
2. Determine rollout configuration to use There are several OOTB
rollout configs.
Standard rollout configuration which allows starting rollout process on
rollout trigger and runs actions: create, update, delete content and
order children nodes.

6
NOTE: Promote Launch is also a standard rollout configuration that is
used for promoting launches.
Optionally you can create a custom rollout configuration
You can create a rollout configuration when the OOTB rollout
configuration does not meet your application requirement.

Create a new rollout configuration


1.Open CRX/De lite, navigate to
/apps/msm/<prjct-name>/rolloutconfig
This is your custom rollout configs which are created based on OOTB
/libs/msm/wcm/rolloutconfigs

2.Click on create node and create a node of type cq:RolloutConfig


Specify jcr:title, jcr:description, cq:trigger

under cq:RolloutConfig node, create cq:liveSyncAction node

7
3.Determine where you need to specify the rollout configuration
You can specify the configuration is following places
Live Copy page properties

Blueprint Page Properties

8
Setting the System Default Rollout Configuration
To specify the default, configure the OSGI service
Day CQ WCM Live Relationship Manager
com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl

Set this path to your custom rollout config.

Live Copy Overview Console


Setting the System Default Rollout Configuration

9
10
11
Configuring Live Copy Configuration

12
Create custom Live copy configuration
Problem Statement: -
When you roll out a page then all link referenced in the page changes to
live copy specific links.
But this is true only for the links inside a component or links in a page
property.
The links inside an experience fragment do not change.

Solution:-
Link Transformer
Use a custom link transformer to rewrite master links into live copy
equivalent links.

Problem Statement
When we create a live copy of the experience fragment or rollout any
experience fragments the sites link inside it does not get updated.
We can create a custom rollout config and achieve that.

 Go to /apps/msm , create folder named rolloutconfig

 Under this node create another node


o  jcr:primaryType ----- cq:RolloutConfig     
o Title: Update XF Site Links
o Name: updateXFlinks
o cq:trigger: rollout

13
 Under this node now create another node
o Name: linksUpdateXF
o Type: cq:LiveSyncAction

The following LiveActionFactory class implements a LiveAction which updates the


link reference in experience fragment on creating a live copy or rollout from master
experience fragment.

**I have excluded the countryselector component from the update, you can update
that part according to your needs.

https://bimmisoi.blogspot.com/2021/07/update-link-reference-inside-
experience.html

14

You might also like