Usually visibility of buttons in Sitecore content editor is configured via QueryState of command, but there are few exceptions. One of this exceptions is Profile Cards button that allows you to edit the Profile Cards associated with item.
Despite there is command declared for this button:
<command name="item:personalize" type="Sitecore.Shell.Applications.WebEdit.Commands.PersonalizeItem,Sitecore.Client"/>
and there is overridden method QueryState which usually is used to control command visibility.
But this method is not used for showing this button in content editor. Instead of it, button is rendered directly as control by Sitecore.Shell.Applications.ContentManager.Editor.RenderProfileCards . This method checks visibility by calling getItemPersonalizationVisibility pipeline.
So, if you need to show/hide Profile Cards button in Sitecore Content Editor then overriding of QueryState for item:personalize command will not take any effect. You should write you own processor for getItemPersonalizationVisibility pipeline.
No comments:
Post a Comment