Thursday 11 November 2010

Creating an application in for the ribbon

To add an application that will be initiated from the context menu in the Ribbon that will enable you to either make changes to the Sitecore item or to an external database, you will need to do the following:

1.       Add an item to the core database
a.       Add an item into /sitecore/content/Applications/Content Editor/Ribbons/Contextual Ribbons/xxxx in the core database
b.      In the Header field add the text that will appear in the ribbon.
c.       In the Icon, add the icon that will appear in the ribbon
d.      In the Click field add the name of the command that is defined in Commands.config e.g. custom:map
2.       Add a line into the commands.config that will initiate your command handler
a.  <command name="custom:map" type="TestProject.SitecoreExtensions.Media.Commands.EditImageAttributes,TestProject.SitecoreExtensions.Media" />
3.       Create a xaml control (see attached)
4.       Create a command
5.       Create the code behind.
Below is a link to sample code. Please note that this is not fully functional. It is just a framework to get you started.

No comments:

Post a Comment