Need to add "publish" feature to the page editor, item editing section. (Under the "More" section would be ideal). How can I do this?
Sitecore page editor - how to extend page editor item editing panel
1.3k Views Asked by Dhanuka777 At
2
There are 2 best solutions below
0

We can achieve it without any code change.
<command name="webedit:publish" type="Sitecore.Shell.Framework.Commands.PublishItem,Sitecore.Kernel" />
Add the above entry in Commands.config file. This file is available in include folder.
- Login to Sitecore Desktop
- Switch database to core
- Duplicate /sitecore/content/Applications/WebEdit/Common Field Buttons/Edit related item
- Rename new item to Publish related item
- Set Click property of this item to chrome:common:edititem({command:"webedit:publish"})
- Switch database back to master
- Open Page Editor and test the new command (it should open the standard publishing popup with the related item ID as a parameter in URL).
Thanks
Fenil
First you need to create a command class. The simplest version would be:
Register new command in
Sitecore.config
(orCommands.config
):Then:
/sitecore/content/Applications/WebEdit/Common Field Buttons/Edit related item
Publish related item
Click
property of this item tomy:publish
Header
,Icon
,Tooltip
)