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

SOLVED

How to remove "convert to experience fragment variation" from component?

mikes22421318
Level 1
Level 1

Hi Community!

Does anybody know how to get rid of the "convert to experience fragment variation" button in the editbar of a component?

convert_to_exp_frag_ver.png

Is it possible to remove this button for a group of users?

Thanks for your help!

Regards

Mike

1 Accepted Solution
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

Hi,

You can do this by :

1. overlaying /libs/cq/experience-fragments/content/v2/conversion node

2. create rendercondition node Render Conditions — Granite UI 1.0 documentation , you can go with Privilege or Feature. Feature will give you the more control over Privilege but you can choose based on your requirement.

View solution in original post

6 Replies
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

Hi,

You can do this by :

1. overlaying /libs/cq/experience-fragments/content/v2/conversion node

2. create rendercondition node Render Conditions — Granite UI 1.0 documentation , you can go with Privilege or Feature. Feature will give you the more control over Privilege but you can choose based on your requirement.

View solution in original post

smacdonald2008
Level 10
Level 10

As Arun suggests - it's involves overlaying the ootb AEM code.

Reto_Zigerlig
Level 3
Level 3

Hi Arun Patidar

I tried your workaround quickly with adding the node granite:rendercondition with privileges restriction directly on the /libs/cq/experience-fragments/content/v2/conversion. (This was just for testing purposes) See:renderConditionExample.png

But the option is still rendered. The function itselves does not work, because the user does not have the permission.

Do I have to add the logic of checking the rendercondition within the overlay on my own?

Arun_Patidar
Community Advisor
Community Advisor

Hi,

The icon is rendering from below js not from granite item, to remove icon you can override below js and make changes

/libs/cq/experience-fragments/editor/clientlibs/experiencefragments/js/editor/actions/edit.EditableActions.XFCONVERT.js

But there is a workaround to deal with your case, you can hide dialog instead button by adding rendercondition node at e.g.

/libs/cq/experience-fragments/content/v2/conversion/content/granite:rendercondition

for testing you can add simple to hide for all

Simple — Granite UI 1.0 documentation

Screen Shot 2018-09-28 at 5.16.41 PM.pngScreen Shot 2018-09-28 at 5.14.36 PM.png

Reto_Zigerlig
Level 3
Level 3

Hi Arun Patidar

Thanks again for your response. Your last mentioned workaround looks a little buggy to me, so the author gets the feeling, that something is broken. Then I would prefer to do it as you mentioned in your first workaround. Render the icon but don't do anything there. Feels a little less buggy to me . In this case, the "proper" solution would be an overlay of the

/libs/cq/experience-fragments/editor/clientlibs/experiencefragments/js/editor/actions/edit .EditableActions.XFCONVERT.js. But since it is below a "granite:InternalArea" node, it is just kinda proper.

Regards,

Reto

bwells78
Level 1
Level 1

I just added some CSS to my author-only clientlibraryfolder:

 

.coral3-Button[data-action=XFCONVERT] {

    display: none;

}

 

Not sure yet if this will have any unintended consequences elsewhere... will adjust if needed.

 

Applying the cq.authoring.dialog.all category to your clientlibraryfolder will ensure it's made available to the editor page.