Expand my Community achievements bar.

How to add a tab in the properties of a page from code?

Avatar

Level 2

I would like to do it from code and not from crxde

5 Replies

Avatar

Community Advisor

@Vodjakxa 

You should be adding tab to the cq:dialog of the page component in your code base and then deploy your changes

 


Amanath Ullah

Avatar

Level 5

Hi @Vodjakxa 

 

You can use VSCode AEM Sync in visual studio code IDE and sync the .content.xml, dialog.xml   

files from your local to your codebase and make changes accordingly without using crx/de console. Then commit the changes if met your requirements

 

Hope this helps

 

Thanks,

Prathyusha

 

Avatar

Level 4

Hi,

You can add multiples tab to your cq:dialoge at your page Component.

Just for a ex you can check here - 

/apps/<your-project-name>/components/<page | page-v2>/cq:dialog/content/items/tabs

 

if this doest not exists you can overlay from OOTB page compoents and add it.

 

Thanks

 

Avatar

Level 4

from codebase 

path -

ui.apps/src/main/content/jcr_root/apps/<your project name>/components/page/_cq_dialog

 

thanks

Avatar

Level 3

You need to create a folder called _cq_dialog under the page component and then .content.xml under _cq_dialog. However if you do not know how the xml is formed or do not know what properties or attributes it should have to work properly, I recommend, create this dialog in crx/de, add the necessary nodes and properties, create a package and import the xml back to the code. Post that you can modify as needed.