Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to enable tenant-specific Content Fragment Models

Avatar

Avatar
Boost 1
Level 1
hinajain29
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
Give Back
Ignite 1
View profile

Avatar
Boost 1
Level 1
hinajain29
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
Give Back
Ignite 1
View profile
hinajain29
Level 1

28-04-2021

Hi all,

 

I have to create Content Fragment Models on tenant level while keeping inheritance of Global/Common level Content Fragment Models.

 

I have below Structure:

 

Global

         Tenant A

          Tenant B

 

Common Content Fragment Models should be placed in global. Whereas specific ones should be placed in respective tenants. Also Tenant should be able to access Global Models as well.

 

In DAM Assets. I created a folder global. Inside global folder, i created Tenant A and Tenant B folders.

 

On global folder I set cq:conf as /conf/global and on Tenant A i set cq:conf as /conf/global/tenantA.

 

However I am unable to see content fragment models of global folder inside tenant A.

 

Any help is really appreciated.

 

Thanks

Hina

 

Replies

Avatar

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

106 posts

Correct Reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

106 posts

Correct Reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile
bilal_ahmad
Level 4

29-04-2021

Hey @hinajain29 ,

As far as I understood you have two tenants under /conf/global i.e. /conf/global/tenant-a and /conf/global/tenant-b.

My first question would be : how did you get the two tenants inside the /conf/gobal ? if you have moved them manually from crx/de then if you go to create a content fragment model at /conf/global/tenant-a location, then as soon as your model is created it'll be moved under /conf/global(I don't know the reason, but this happens).

Solution: I don't know how feasible it'd be for you or depends on if you could move around the nodes then there is possibility.

you need to create your tenants outside /conf/global, i.e now you have three folders under /conf
1. /cong/global --> global cf modls will reside here

2. /conf/tenant-a --> tenant a specific cf models reside here

3. /conf/tenant-b --> tenant b specific cf models reside here

Now go to:
1. /content/dam/YourProject/global and set cq:conf="/conf/global" --> this will enable you to access global cf models.

bilal_ahmad_0-1619691008174.png

 



2. /content/dam/YourProject/global/tenant-a and set cq:conf="/conf/tenant-a" --> this will enable you to access tenant-a specific cf models.

bilal_ahmad_1-1619691043652.png


Edit: I realized that I replicated your problem statement rather than providing a solution for it.
Suggestion: We can't populate the global cf models inside the tenant-a dam folder. If you have to implement, you should take a look at :

/libs/dam/cfm/admin/content/v2/createfragment/jcr:content/body/items/form/items/wizard/items/template/items/template/field/datasource

and

/libs/dam/cfm/admin/components/v2/datasources/templates/templates.jsp


Hope this helps!

Thanks,

Bilal.

Avatar

Avatar
Affirm 100
Level 10
asutosh_jena
Level 10

Likes

367 likes

Total Posts

462 posts

Correct Reply

134 solutions
Top badges earned
Affirm 100
Ignite 1
Establish
Give Back 50
Give Back 5
View profile

Avatar
Affirm 100
Level 10
asutosh_jena
Level 10

Likes

367 likes

Total Posts

462 posts

Correct Reply

134 solutions
Top badges earned
Affirm 100
Ignite 1
Establish
Give Back 50
Give Back 5
View profile
asutosh_jena
Level 10

29-04-2021

Hi @hinajain29 

 

There is no way you can apply 2 different cloud config to a single folder property. It has to be always 1.

 

You cannot create tenant-a and tenant-b inside conf/global. It has to be
/conf/global -> This will hold all your global content fragment models
/conf/tenant-a -> This will hold all your tenant a specific content fragment models

/conf/tenant-b -> This will hold all your tenant b specific content fragment models

 

Now you can create the global content folder under /content/dam/project and then on folder properties set the Cloud Configuration as "/conf/global". This will allow the global content fragment models to be available under /content/dam/project/global and you will be able to create the content fragments out of it.

 

asutosh_jena_0-1619691673933.png

 

Same way can create the tenant-a content folder under /content/dam/project/global and then on folder properties set the Cloud Configuration as "/conf/tenant-a". This will allow the tenant-a content fragment models to be available under /content/dam/project/global/tenant-a and you will be able to create the content fragments out of it.

asutosh_jena_1-1619691710602.png

 

Same way can create the tenant-b content folder under /content/dam/project/global and then on folder properties set the Cloud Configuration as "/conf/tenant-b". This will allow the tenant-b content fragment models to be available under /content/dam/project/global/tenant-b and you will be able to create the content fragments out of it.

asutosh_jena_2-1619691741704.png

 

You should be able to keep all global CFs inside /content/dam/project/global where as Tenant A in /content/dam/project/global/tenant-a and Tenant B in /content/dam/project/global/tenant-b

 

Hope this helps!

Thanks

Avatar

Avatar
Boost 1
Level 1
hinajain29
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
Give Back
Ignite 1
View profile

Avatar
Boost 1
Level 1
hinajain29
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
Give Back
Ignite 1
View profile
hinajain29
Level 1

29-04-2021

Hi Ashish,

 

Thanks for the reply. is there a way to overlay global models similar to overlaying core text , image components. Can we create a model in Tenant A having sling:resourceSuperType as global/model path?

 

Thanks

Hina