MOSS WCM - 自定义列表项视图的最佳方式

发布于 2024-08-01 13:39:24 字数 312 浏览 2 评论 0 原文

我正在创建一个面向外部的 SharePoint 网站,其中包含许多自定义列表。 其中一些非常复杂。

我通常会像避免瘟疫一样避免使用 SharePoint Designer,而更喜欢坚持使用 Visual Studio。

要向用户显示列表项,我应该真正尝试并开始制作自定义 DispForm.aspx 还是最好创建我自己的自定义 asp.net 页面,将项目 id 传递到其中并使用后面的代码填充页面?

如果我选择第二个选项,是否有一种方法可以将列表项“绑定”到页面,以便我可以直接访问字段,或者我是否必须进行文字替换等?

谢谢

I am createing an external facing SharePoint site which contains a number of custom lists. Some of these are extremely complicated.

I generally avoid using the SharePoint Designer like the plague, preferring to stick to Visual Studio.

To display a list item to users should I really try and get my head around making a custom DispForm.aspx or would is it better to create my own custom asp.net page, pass the item id into it and populate the page using code behind?

If I go the second option is there a way to 'bind' the list item to the page so I can directly access the fields or would I have to do literal replacement etc?

Thanks

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

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

发布评论

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

评论(3

月下客 2024-08-08 13:39:24

最好的办法是在 SP Designer 中自定义表单并使用一项功能来部署修改后的列表页面。

您可以通过修改列表 schema.xml 并在底部指定自定义列表页面来完成此操作。

Best thing to do is, customize the form in SP Designer and use a feature to deploy the modified list pages.

You can do this by modifying the list schema.xml and specifiying your custom list pages at the bottom.

花桑 2024-08-08 13:39:24

这取决于您想要在显示表单中进行哪种自定义。

  1. 您是否正在尝试获得显示表单的自定义外观和感觉? (尝试将系统母版页设置为您的品牌母版页)
  2. 您是否尝试以与两列列表不同的方式排列字段? (您需要创建自定义ListItemIterator&渲染模板)请参阅了解更多信息。 拥有 ListIterator 后,您需要编写自定义列表模板,并且在 Schema.xml 末尾,您需要将模板设置为您的自定义模板。

    <前><代码><表格>;
    <表单类型=“DisplayForm”Url=“DispForm.aspx”模板=“CustomListForm”SetupPath=“pages\form.aspx”WebPartZoneID=“Main”/>/>

  3. 并回答第二个问题如何绑定。 您可以尝试 SPDataSource。这将允许您获取单个项目的详细信息。将模式指定为 ListItem

Its depends on what Kind of customization you wanted in the Display form.

  1. Are you trying to get the Custom Look and Feel for the Display Form ? (Try setting the System Master page to your Branded Master page)
  2. Are you trying to get the Fields arranged in a different fashion unlike Two column listing? ( You need to create a Custom ListItemIterator & Rendering Template) Refer this for more information. Once you have the ListIterator then you need to write a custom List Template and in the end of Schema.xml you need to set the Template to your custom Template.

    <Forms>
        <Form Type="DisplayForm" Url="DispForm.aspx" Template="CustomListForm" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
    

  3. And to answer the second Question on how to bind. You can Try out SPDataSource and this.This will allow you get the details for the Single Item.Specify the mode to ListItem

墨离汐 2024-08-08 13:39:24

我最终创建了一个完全独立的 ASP.Net 页面,该页面仅引用列表并根据需要使用查询参数等显示项目,

这效果很好

I ended up creating a completely seperate ASP.Net page that just referenced the List and displayed items as needed with query parameters etc

This worked well

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