0

I need to add a custom button for EE and run a script if the user clicks on the button. basically, I know how to create a button at the core database at

/sitecore/content/Applications/WebEdit/Ribbons/WebEdit

and I know that I need call command like item:executescript(id=$Target,script={93BAF91E-1111-4C90-8A1F-5AF71C9B7033},scriptDb=master) but I am not sure that should be set at layout option for this button at Sitecore Rock,

1

If you are doing a button on Experience editor ribbon, you should add the button in the core database.

e.g, We have added a button called Unlock Item - which unlocks the locked items of other users

Steps we followed to do this:

  1. Added a button in core DB under content --> Applications --> Content Editor --> Ribbons --> Chunks --> Workflow Edit
  2. Set the click event like 'contenteditorcustom:unlockitem'
  3. Created a Custom Command and implemented the logic in Execute method (in your case executing PowerShell script)
  4. Added a patch config for the command under commands with name 'contenteditorcustom:unlockitem' and set the type to the Custom command class.

This should enable the Experience editor button to function the way you want.

Hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.