Sharepoint 2007 - 自定义列表配置 - 部署时是否需要列表表单?
我有一个功能是配置 1 个文档库和 2 个自定义列表。每个列表都包含一个文件夹,其中包含该列表的 schema.xml。每个文件夹还包含关联的表单(AllItems、DispForm、EditForm、NewForm 等)。一切都正确部署/工作,但将相同的表单复制到每个列表的文件夹中似乎有点多余。这些列表没有什么特别之处 - 它们基本上是默认的文档库/通用列表,其中包含通过新内容类型(源自项目/文档)提供的附加字段。
据我所知,这些表格非常通用。是否有我可以从列表中引用的预安装表单,这样我就不必部署所有这些额外文件?我有什么理由不想这样做吗?
更新 - 将注释中的 xml 移至原始问题以提高可读性:
<Forms>
<Form Type="DisplayForm" Url="Forms/DispForm.aspx" WebPartZoneID="Main"/>
<Form Type="EditForm" Url="Forms/EditForm.aspx" WebPartZoneID="Main"/>
<Form Type="NewForm" Url="Forms/Upload.aspx" WebPartZoneID="Main"/>
<Form Type="NewFormDialog" Path="EditDlg.htm">
....
I have a feature which is provisioning 1 document library and 2 custom lists. A folder is included for each list containing the schema.xml for that list. Each folder also contains the associated forms (AllItems, DispForm, EditForm, NewForm, etc.). Everything deploys/works correctly but it seems a little redundant having the same forms copied into each list's folder. There is nothing special about these lists - the are basically a default doc library/generic list with additional fields provided through new content types (derived from Item/Document).
As far as I can tell these forms are pretty generic. Are there pre-installed forms that I can reference from my list so I don't have to deploy all of these extra files? Is there any reason I would not want to do this?
Update - moving xml in comment to original question for readability:
<Forms>
<Form Type="DisplayForm" Url="Forms/DispForm.aspx" WebPartZoneID="Main"/>
<Form Type="EditForm" Url="Forms/EditForm.aspx" WebPartZoneID="Main"/>
<Form Type="NewForm" Url="Forms/Upload.aspx" WebPartZoneID="Main"/>
<Form Type="NewFormDialog" Path="EditDlg.htm">
....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您不指定具体页面,则会使用虚拟默认值。
所有列表都使用这些模板默认值,除非您使用 SharePoint 设计器等工具来自定义页面。然后,该模板用于创建具体页面,您可以自定义特定列表的外观,而不会影响其他列表。
对于我的自定义定义,我使用
如果您没有理由自定义这些表单的开箱即用版本,则可以使用虚拟表单而不是部署副本。
There are virtual defaults that are used if you don't specify a concrete page.
All lists use these template defaults unless you use a tool like SharePoint designer to customize the page. Then the template is used to create the concrete page and you can customize the look for a particular list without affecting others.
For my custom definitions, I use
If you have no reason to customize the out of the box version of these forms, you can use the virtual form and not deploy copies.