Hide/show custom button in ribbon in Sitecore 8.x

Recently I’ve made demo for fresh Sitecore developers in company where I’m working now. The demo was about customization of Content Editor interface and specifically how to add custom button to ribbon and show/hide it dependent on some condition. I did that previously and how-tos before for me was this answer. So I just inherited from Sitecore.Shell.Framework.Commands.Command class for my custom command one. But if in case of Execute method all was fine that QueryState one did not fire. After some research I found that in Sitecore 8.1 for this purpose instead of using old good Sitecore.Shell.Framework.Commands.Command I have to use Sitecore.Shell.Applications.WebEdit.Commands.WebEditCommand from Sitecore.ExperienceEditor assembly.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s