本文介绍了以编程方式将网站模板(.stp)添加到SharePoint的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
作为构建过程的一部分,我想以编程方式将自定义网站模板(.stp文件)添加到MOSS团队网站集中.谁能指出我的最佳方法?
I would like to programmatically add a custom site template (.stp file) to a MOSS team site collection as part of my build process. Can anyone point me towards the best way to do this?
谢谢MagicAndi.
Thanks, MagicAndi.
推荐答案
此功能的一种实现方法是使用文件元素. STP文件位于/_catalogs/wt
中,因此此类功能将上传文件.
A way of doing this with a feature would be to use the File element. STP files live in /_catalogs/wt
so this type of feature will upload the file.
更新:,但为完整起见,这里是elements.xml:
Update: More details in Create Feature to Upload Site Template File (.stp) in MOSS but for completeness here is the elements.xml:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="TeamSiteTemplate" List="111" Url="_catalogs/wt">
<File Url="TeamSiteTemplate.stp" Type="GhostableInLibrary">
<Property Name="LanguageDisplay" Value="English" />
<Property Name="Version" Value="3" />
</File>
</Module>
</Elements>
这篇关于以编程方式将网站模板(.stp)添加到SharePoint的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!