代码之家  ›  专栏  ›  技术社区  ›  van

Moss:从发布网站创建网站模板

  •  0
  • van  · 技术社区  · 16 年前

    在我的moss网站上,我试图将发布网站保存为网站模板。然后从此模板创建子网站。

    我可以成功地创建网站模板,并将其填充到网站模板库中。遵循这些说明…… http://blah.winsmarts.com/2007-7-All_you_ever_wanted_to_know_about_SharePoint_2007_Site_Templates.aspx

    但当我尝试从此模板创建子网站时,会显示一条错误消息,说明:

    The template you have chosen is invalid or cannot be found.   at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
       at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
    

    当我将站点模板保存为.stp文件,然后重命名为.cab并提取和查看manifest.xml时,我看到templateID=39。这与 具有相同ID的CMSPPublishing模板?

    如果是,如何更改ID并重新打包cab文件?

    --编辑--我尝试将ID从39更改为327,重新打包cab并上载,尽管创建子网站时网站模板确实显示为一个选项…因此,多个模板是否具有相同的模板ID并不重要。

    多谢, 导航卫星

    1 回复  |  直到 16 年前
        1
  •  0
  •   van    16 年前

    查看了SharePoint诊断日志后,我发现正在从失败的模板应用功能。

    将Web功能与SharePoint列出的网站和网站功能列表进行比较时,我删除了列表中没有的功能,特别是那些无法从日志中应用的功能。

    使用下面的cabarc n命令重新生成输出到stp文件的cab文件: http://billwg.blogspot.com/2009/04/how-to-modify-project-portal-site.html

    然后成功应用了发布模板,请注意,创建网站后,必须重新打开发布功能。

    以下是在解压缩到cab文件后从stp中的manifest.xml中提取的WebFeatures

    <WebFeatures>
    <Feature ID="e8734bb6-be8e-48a1-b036-5a40ff0b8a81"/>
    <Feature ID="56dd7fe7-a155-4283-b5e6-6147560601ee"/>
    <Feature ID="0be49fe9-9bc9-409d-abf9-702753bd878d"/>
    <Feature ID="99fe402e-89a0-45aa-9163-85342e865dc8"/>
    <Feature ID="541f5f57-c847-4e16-b59a-b31e90e6f9ea">
    <Properties>
    <Property Key="InheritGlobalNavigation" Value="true"/>
    <Property Key="ShowSiblings" Value="true"/>
    <Property Key="IncludeSubSites" Value="true"/>
    </Properties>
    </Feature>
    </WebFeatures>
    
    推荐文章