将 Sharepoint 2007 功能添加到自定义网站模板

发布于 2024-08-02 22:51:33 字数 836 浏览 2 评论 0原文

我有一个品牌功能,效果很好,并且适用于除自定义网站模板之外的所有内容(如 这篇 MSDN 文章 不可能装订到开箱即用的自定义模板)。

stapling.xml

staple all site defitions to BrandingChildSiteInitializer
      <FeatureSiteTemplateAssociation
        Id="1204A425-D105-46c5-BB2C-473A2F27B563"
        TemplateName="GLOBAL" />

staple blank site template to BrandingChildSiteInitializer
      <FeatureSiteTemplateAssociation
        Id="1204A425-D105-46c5-BB2C-473A2F27B563"
        TemplateName="STS#0" />

总之,这不会被装订到创建并添加到网站模板库的自定义网站。因此,当用户根据自定义模板创建新网站时,不会应用品牌。我如何将此功能固定到每个网站?

我正在考虑我的功能或解决方案中的其他功能是否可以将自定义模板添加到全局列表?无论如何,我不知道从哪里开始。

我的 .wsp 纯粹是一堆自定义 C#、ASP、HTTPHandler 等,它们附加了新的母版页并更改了主题。该功能只是告诉新创建的网站使用父网站的属性(自定义母版页、主题等)

I have a branding feature that works great and staples to everything but custom site templates (as noted at the bottom comment on this MSDN article it's not possible to staple to custom templates out of the box).

stapling.xml

staple all site defitions to BrandingChildSiteInitializer
      <FeatureSiteTemplateAssociation
        Id="1204A425-D105-46c5-BB2C-473A2F27B563"
        TemplateName="GLOBAL" />

staple blank site template to BrandingChildSiteInitializer
      <FeatureSiteTemplateAssociation
        Id="1204A425-D105-46c5-BB2C-473A2F27B563"
        TemplateName="STS#0" />

In summary, this does not get stapled to custom sites that one creates and adds to site template gallery. So, when a user creates a new site based off a custom template the branding doesn't get applied. How would I get this feature stapled to every site?

I was thinking of something on my feature or other features in my solution that can add custom templates to the global list? Im not sure where to start regardless.

My .wsp is purely a bunch of custom C#, ASP, HTTPHandler etc that attaches a new masterpage and changes the theme. The feature in question simply tells the newly created site to use the properties of the parent (custom masterpage, theme etc)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

岁月静好 2024-08-09 22:51:33

如果您已在顶层启用发布功能;您可以强制所有子站点使用父母版页。

If you've turned on publishing at the top level; you can force all child sites to use the parent masterpage.

梦境 2024-08-09 22:51:33

Have look at this post, it mentions stapling to all sites via the GLOBAL name. There might be something different that this guy has done to create the stapling declarations working compared to your files?

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