Skip to main content
Level 7
Mar 10, 2025 1:17 PM UTC
Solved

Folder structure for content fragment MSM

Hello Team,

 

I am exploring MSM for content fragments. Can someone provide me, how you have implemented this feature in your project? How you have maintained your locale folders, logic etc.?

 

In my case, for one of the features, I have created multiple Content fragments (en-service, fr-service, it-service) in a single folder for each countries. Then, for a particular locale page (abc.com/en/test,  abc.com/fr/test,  abc.com/it/test ) get the current language. Then read the CF folder. fetch the required content fragment(i.e en-service).

 

For other feature, I have created these folder structures

/content/dam/my-folder/abc/en

/content/dam/my-folder/abc/fr
/content/dam/my-folder/abc/gb
/content/dam/my-folder/abc/it

Then, based on current page(abc.com/en/home), get the CF data from: /content/dam/my-folder/abc/en

then proceed.

 

Wanted to know, in above cases, will MSM for content fragment makes sense to use?

 

Thanks in advance

 

cc @konstantyn_diachenko  @arunpatidar @lukasz-m  @sureshdhulipudi  @amitvishwakarma 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
konstantyn_diachenko
konstantyn_diachenkoAccepted solution
Community Advisor
Mar 10, 2025 5:47 PM UTC

Hi @mahesh_gunaje ,

 

Is it comfortable for your authors to create folder with locales folders per each domain of content fragments?

 

I'd suggest the following structure:

/content/dam/project-a/content-fragments |__/language-masters |__en |__abc (service a) |__cf1 |__cf2 |__def (service b) |__fr |__abc (service a) |__cf1 - live copy from /language-masters/en/abc/cf1 |__cf2 - live copy from /language-masters/en/abc/cf2 |__de |__it

 

It will help you avoid creating locales folder every time. You will need to create only service-related folders.

 

To utilize the whole power of MSM, use MSM for sites as well. Create language copies and live copies. During the rollout process, out of the box rollout should rewrite link for content fragment to target language. For example:

Source page: /content/project-a/language-masters/en/abc-cf1-detail

CF path in source page: /content/dam/project-a/content-fragments/language-masters/en/abc/cf1

Destination page: /content/project-a/language-masters/fr/abc-cf1-detail

CF path in source page: /content/dam/project-a/content-fragments/language-masters/fr/abc/cf1

 

However, sometimes OOTB rollout doesn't rewrite such CF links, because of some sort of problems. In this case, I would suggest to create own Rollout Action that will rewrite CF links according to your structure. You can check examples in the com.day.cq.wcm.msm.impl bundle (com.day.cq.wcm.msm.impl.actions.ReferencesUpdateCFActionFactory). 

Example how to create custom rollout action: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/customizing-rollouts/m-p/611021

 

In addition, you can read more about MSM principles here:

- https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/content-fragments/content-fragments-msm

- https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/manage/reuse-assets-using-msm

- https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/sites/administering/reusing-content/msm/overview 

 

Best regards,

Kostiantyn Diachenko.

 

Kostiantyn Diachenko, Community Advisor, Certified Senior AEM Developer, creator of free AEM VLT Tool, maintainer of AEM Tools plugin.

1 reply

konstantyn_diachenko
Community Advisor
konstantyn_diachenkoCommunity AdvisorAccepted solution
Community Advisor
Mar 10, 2025 5:47 PM UTC

Hi @mahesh_gunaje ,

 

Is it comfortable for your authors to create folder with locales folders per each domain of content fragments?

 

I'd suggest the following structure:

/content/dam/project-a/content-fragments |__/language-masters |__en |__abc (service a) |__cf1 |__cf2 |__def (service b) |__fr |__abc (service a) |__cf1 - live copy from /language-masters/en/abc/cf1 |__cf2 - live copy from /language-masters/en/abc/cf2 |__de |__it

 

It will help you avoid creating locales folder every time. You will need to create only service-related folders.

 

To utilize the whole power of MSM, use MSM for sites as well. Create language copies and live copies. During the rollout process, out of the box rollout should rewrite link for content fragment to target language. For example:

Source page: /content/project-a/language-masters/en/abc-cf1-detail

CF path in source page: /content/dam/project-a/content-fragments/language-masters/en/abc/cf1

Destination page: /content/project-a/language-masters/fr/abc-cf1-detail

CF path in source page: /content/dam/project-a/content-fragments/language-masters/fr/abc/cf1

 

However, sometimes OOTB rollout doesn't rewrite such CF links, because of some sort of problems. In this case, I would suggest to create own Rollout Action that will rewrite CF links according to your structure. You can check examples in the com.day.cq.wcm.msm.impl bundle (com.day.cq.wcm.msm.impl.actions.ReferencesUpdateCFActionFactory). 

Example how to create custom rollout action: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/customizing-rollouts/m-p/611021

 

In addition, you can read more about MSM principles here:

- https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/content-fragments/content-fragments-msm

- https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/manage/reuse-assets-using-msm

- https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/sites/administering/reusing-content/msm/overview 

 

Best regards,

Kostiantyn Diachenko.

 

Translate
Kostiantyn Diachenko, Community Advisor, Certified Senior AEM Developer, creator of free AEM VLT Tool, maintainer of AEM Tools plugin.