WSS3SDK之:内容类型FormTemplates架构概览
本架构描述了您可以作为定制信息添加到内容类型中的可选XML。这个XML结点必须存放于内容类型定义的 XMLDocument元素中。
本架构允许您指定在Windows SharePoint Services 3.0 用户界面里用于显示列表项到显示,新建或编辑页面中所使用的窗体模板。
本架构包含下列元素:
-
FormTemplates 根元素。 FormTemplates 元素具有下列属性:
-
xmlns 必需 Text类型。表示XML的架构命名空间。本架构的命名空间为:
http://schemas.microsoft.com/sharepoint/v3/contenttype/forms
-
-
Display 必需 Text类型。用于指定所采用的自定义显示窗体(Display Form)模板的名称。
-
Edit 必需 Text类型。用于指定所采用的自定义显示窗体(Edit Form)模板的名称。
-
New 必需 Text类型。 用于指定所采用的自定义显示窗体(New Form)模板的名称。
此处引用的窗体模板是指渲染在WSS网页内容区域中央的.asmx控件。也就是页面中刨去WSS框架元素(这部分通常被称为chrome)后的部分。 由 Windows SharePoint Services 来渲染页面中的chrome部分。
您所指定的窗体模板名称必须是在前端web服务器上Program files\common files\microsoft shared\web server extensions\12\template\controltemplates目录中某个.ascx文件中的一个渲染模板(RenderingTemplate)名称。
如果我们在内容类型定义XML中没有包含这些XmlDocument元素内容,WSS将使用默认值。WSS会替您渲染这些窗体。
下面是一个文档(Document)内容类型的XmlDocument元素的默认内容:
XML
xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms"
<Display>DocumentLibraryForm</Display>
<Edit>DocumentLibraryForm</Edit>
<New>DocumentLibraryForm</New>
</FormTemplates>
下面是一个项目(Item)内容类型的XmlDocument元素的默认内容:
XMLxmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms"
<Display>ListForm</Display>
<Edit>ListForm</Edit>
<New>ListForm</New>
</FormTemplates>
浙公网安备 33010602011771号