Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Change default 'Create' dropdown menu to only include 'File' and 'Folder'

Avatar

Level 3

How can we change the default 'Create' dropdown menu to only include 'File' and 'Folder' ?

 

 

11 Replies

Avatar

Community Advisor

Which default create drop-down menu are you referring to? Can you be more specific 

Avatar

Level 3

mbrennan_0-1686783006832.png

In the Assets section, when creating an asset you can see all of these options in the drop down. We would like to remove them so that only 'Folder' and 'File' remain.

 

Avatar

Community Advisor

Its not recommended to remove those options at these OOTB functionality will help you in achieving other goals as name suggest in the drop down list but if you still wants to overwrite it you can do it by overriding /libs/dam/gui/content/assets/jcr:content/actions/secondary/create/items node inside you app folder 

Avatar

Community Advisor

Hello @mbrennan 

 

You can use granite:rendercondition to hide the options for a specific group. Please don't hide for all.

Example: 

/libs/dam/gui/content/assets/jcr:content/actions/secondary/create/items/folderupload/granite:rendercondition

 

@DPrakashRaj  has already shared the location of Create dropdown


Aanchal Sikka

Avatar

Level 3

Hello @aanchal-sikka thank you so much, this is a great direction.

 

I have defined a group which contains all the users I do not want to be able to see

/libs/dam/gui/content/assets/jcr:content/actions/secondary/create/items/createfragment/granite:rendercondition

 

However this is all I see

mbrennan_0-1686844145641.png

I previously had an ACL access policy in that window which was all which I deleted, and now I can't get it back.

 

Avatar

Community Advisor

Hello @mbrennan 

 

In the article shared below, there is an example of a rendercondition via group membership

 

https://www.bounteous.com/insights/2020/06/10/control-aem-action-menus-render-conditions 

 

We need not tamper ACLs.

 


Aanchal Sikka

Avatar

Level 3

This is working for me!

 

I was able to change most of the menu options.

 

There are a few outliers-

import ugc - only has data node

create live copy - only has data node

metadata - has no child nodes

"/libs/dam/gui/content/assets/jcr:content/actions/secondary/create/items/"

mbrennan_0-1686869411484.png

 

Avatar

Community Advisor

@mbrennan 

 

Added granite:rendercondition child node doesn't work for these ?

 

import ugc - only has data node

create live copy - only has data node

metadata - has no child nodes


Aanchal Sikka

Avatar

Level 3

I am able to create nodes granite:rendercondition

"/libs/dam/gui/content/assets/jcr:content/actions/secondary/create/items/ugc/granite:rendercondition"

"/libs/dam/gui/content/assets/jcr:content/actions/secondary/create/items/createlivecopy/granite:rendercondition"

"/libs/dam/gui/content/assets/jcr:content/actions/secondary/create/items/metadata/granite:rendercondition"

 

 

Was able to overlay nodes to app

"/libs/dam/gui/content/assets/jcr:content/actions/secondary/create/items/ugc/"

"/libs/dam/gui/content/assets/jcr:content/actions/secondary/create/items/createlivecopy"

"/libs/dam/gui/content/assets/jcr:content/actions/secondary/create/items/metadata"

 

And add in granite:rendercondition properties per

step 2 of "Add a render condition"

https://www.bounteous.com/insights/2020/06/10/control-aem-action-menus-render-condition

 

However they are still visible in the drop down menu

Avatar

Level 3

Additionally I went back through and overlayed the created grantie:rendercondition nodes to app.

 

However the options are still visible in the drop down