WhatsPopularWebPart 作为委托控件
我想添加 WhatsPopularWebPart 作为委托控件。在母版页中注册了一个 controlid 并使用此 XML 清单创建了一个功能:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Control ControlAssembly="Microsoft.Office.Server.WebAnalytics.UI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" ControlClass="Microsoft.Office.Server.WebAnalytics.Reporting.WhatsPopularWebPart" Id="WebAnalyticsDelegate" >
<Property Name="Title">Most viewed pages</Property>
<Property Name="DateRange">SevenDays</Property>
<Property Name="ItemLimit">6</Property>
</Control>
但是,该 Web 部件始终显示“正在加载”。我认为回调没有执行。当我查看 HTML 时,WebPartId 只是零(0000-00000-00 等),而不是有效的 GUID。也许这就是问题所在? 我想将 Web 部件添加到网站上的每个页面,因此使用委托控件。
I want to add the WhatsPopularWebPart as a delegate control. Registered a controlid in the masterpage and created a feature with this XML-manifest:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Control ControlAssembly="Microsoft.Office.Server.WebAnalytics.UI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" ControlClass="Microsoft.Office.Server.WebAnalytics.Reporting.WhatsPopularWebPart" Id="WebAnalyticsDelegate" >
<Property Name="Title">Most viewed pages</Property>
<Property Name="DateRange">SevenDays</Property>
<Property Name="ItemLimit">6</Property>
</Control>
However, the webpart keeps saying "Loading". I think the callback is not executed. When I look at the HTML, the WebPartId is only zeroes (0000-00000-00 etc.) instead of a valid GUID. Perhaps that is the problem?
I want to add the webpart to every page on the site, therefore using delegate controls.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗯...
我不明白为什么它不起作用。请参阅此链接:
http://blog.brianfarnhill.com/2008/12/08/using-the-delegate-control-to-deploy-a-web-part-through-features/
也许这是这个特定的问题网页部件:http://social.msdn .microsoft.com/Forums/en/sharepoint2010general/thread/93782f9c-b582-436c-8c66-12349fd752b2
您是否尝试过其他 Web 部件?
Hum...
I don't see why it is not working. See this link :
http://blog.brianfarnhill.com/2008/12/08/using-the-delegate-control-to-deploy-a-web-part-through-features/
Maybe it is a problem with This particular webpart : http://social.msdn.microsoft.com/Forums/en/sharepoint2010general/thread/93782f9c-b582-436c-8c66-12349fd752b2
Have you tried with other webpart ?
解决方案:母版页中的 ContentPlaceHolder 以及每个页面布局中该 ContentPlaceHolder 中的 Web 部件区域。进一步在页面布局的配置中使用 WhatsPopularWebPart 的 Web 部件定义。问题解决了。
Solution: ContentPlaceHolder in masterpage and in every page layout a webpart zone in that ContentPlaceHolder. Further in the provisioning of the pagelayout an with the webpart definition of the WhatsPopularWebPart. Problem solved.