コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

Edit bar

Avatar

Level 1

How can I add my own button to edit bar of component? I can't find a source JS code...

1 受け入れられたソリューション

Avatar

正解者
Level 7

In case you want to customize the behavior of edit button then yes you will need to overlay EditBar.js.

But if you simply want to create your custom action in editBar like edit button then you can follow below steps:

  1. create cq:editConfig node for your component
  2. create a child node of cq:editConfig of type nt:unstructured having name - cq:actionConfigs
  3. under cq:actionConfigs you can create custom buttons in form of nodes and create their corresponding JS handlers (follow example shared on dev.day link - http://dev.day.com/docs/en/cq/5-5/developing/components/edit_config.html#cq:actionConfigs)
    • so on click of button, the attached js function will be invoked where you can write whatever you need to achieve on click of your custom button.

元の投稿で解決策を見る

4 返信

Avatar

正解者
Level 7

In case you want to customize the behavior of edit button then yes you will need to overlay EditBar.js.

But if you simply want to create your custom action in editBar like edit button then you can follow below steps:

  1. create cq:editConfig node for your component
  2. create a child node of cq:editConfig of type nt:unstructured having name - cq:actionConfigs
  3. under cq:actionConfigs you can create custom buttons in form of nodes and create their corresponding JS handlers (follow example shared on dev.day link - http://dev.day.com/docs/en/cq/5-5/developing/components/edit_config.html#cq:actionConfigs)
    • so on click of button, the attached js function will be invoked where you can write whatever you need to achieve on click of your custom button.

Avatar

Level 10

Can you provide a screen shot of exactly where you want to add a button. Typically, you can over-ride any of the AEM components. 

Avatar

Level 1

[img]img.png[/img]

where can I find source code for "edit button" for example? I know about "cq:editConfig" node, but I need exactly source code for this panel.

Avatar

Level 10

Pavel Kulsha wrote...

where can I find source code for "edit button" for example? I know about "cq:editConfig" node, but I need exactly source code for this panel.

 

/libs/cq/ui/widgets/source/widgets/wcm/EditBar.js