如何安装新事件Sitecore的发布按钮 [英] How to attach new event to sitecore publish button

查看:299
本文介绍了如何安装新事件Sitecore的发布按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要刷新我的Sitecore的树节点发布我的项目之后。
在核心数据库,当我们转到Sitecore的/内容/应用/内容编辑/色带/结块/出版/出版项目,有一个名为单击字段。项目:publishnow已经存在。我的问题是我怎么在这里添加额外的我自己的事件。

I need to refresh my sitecore tree nodes after I publish my items. In core database, when we goto sitecore/content/Applications/Content Editor/Ribbons/Chunks/Publish/Publish item, there is a field called "Click". item:publishnow already there. My question is how do I add additional my own event to here.

推荐答案

尽管这个问题已经回答为TwentyGotoTen提到,多一点信息:

如果你打开​​你的Commands.config(位于APP_CONFIG文件夹),你会看到<命令名称=项:publishnowTYPE =Sitecore.Shell.Framework.Commands.PublishNow,Sitecore.Kernel /> 或类似设在那里的某个地方的东西。你既可以创建自己的发布活动,并更换项目:publishnow 命令或者你可以使用,你可以在&LT定义事件;事件>在web.config 节点。应该有一个名为事件发布:年底在那里。如果您创建自己的事件,你可以调用的发布结束后,并让它重新加载项。

Although this question was already answered as TwentyGotoTen mentions, a little more information:
If you open your Commands.config (located in the App_Config folder) you'll see <command name="item:publishnow" type="Sitecore.Shell.Framework.Commands.PublishNow,Sitecore.Kernel" /> or something similar located in there somewhere. You could either create your own publish event and replace the item:publishnow command or you could use an event which you can define in the <events> node in the web.config. There should be an event called publish:end in there. If you create your own event you can call that after the publish end and have it reload your item.

由于在其他问题中提到,约翰西大约有一个伟大的文章<一个href=\"http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2011/08/Load-or-Reload-an-Item-in-the-Sitecore-ASPNET-CMS.aspx\"相对=nofollow>装载或重装在Sitecore的的一个项目。

此外,约翰韦斯特物品中的另一个是<一个href=\"http://www.sitecore.net/unitedkingdom/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2011/05/All-About-Events-in-the-Sitecore-ASPNET-CMS.aspx\"相对=nofollow>所有关于Sitecore的的事件,如果你想创建自己的事件,这将是一个很好看的。

As mentioned in the other question, John West has a great article about loading or reloading an item in Sitecore.
Also, another one of John Wests articles is All about events in Sitecore, which would be a good read if you want to create your own event.

这篇关于如何安装新事件Sitecore的发布按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆