I am currently using a custom Ribbon Button which has a command attached to it in the Content editor. I want to create the same ribbon button in experience editor mode and use the same command.
1 Answer
I have implemented a custom button
on the Experience Editor Ribbon
. The requirement was to open a custom popup window by clicking on a button. So for this, I need to use Sitecore Rocks
to create a button in the core database
.
Then you need to create a class in your code that will be inherited with Sitecore.Shell.Framework.Commands.Command
. This will have a method called Execute
that will again call a Run
method and here you need to write your logic.
After completing the things, you need to create a patch file
and provide the entry of your class
and assembly
.
Then you have to create a JS file
in your hosted application folder and it will generate the request.
I have only given you a brief idea that how it is going to be implemented. So I would like you to refer to this blog written by me that contains the step-by-step process to achieve this.
https://sbhatiablogs.wordpress.com/2019/09/02/add-a-custom-button-on-experience-editor-ribbon/
Hope this will give you an idea to complete your task.
Thanks