WhatsPopularWebPart 作为委托控件

发布于 2024-10-20 16:12:49 字数 775 浏览 0 评论 0原文

我想添加 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

可爱咩 2024-10-27 16:12:49

嗯...

我不明白为什么它不起作用。请参阅此链接:
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 ?

流年里的时光 2024-10-27 16:12:49

解决方案:母版页中的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文