如何在Sharepoint列表中自定义Dispform.aspx

发布于 2024-07-24 00:02:38 字数 455 浏览 11 评论 0原文

早上好,

我有一个 SharePoint 网站,我已经尝试修复它有一段时间了。 我在将字段添加到 NewForm.aspx 和 EditForm.aspx 中时没有遇到问题,但 Dispform.aspx 似乎是一个完全不同的问题。

我一直在使用 SharePoint Designer,看起来好像所有其他字段都使用此显示:

<xsl:value-of select="@Priority"/>

但是当我继续并遵循相同的格式尝试插入新字段时,它会继续提取空值,当我'我肯定应该有一些东西。

简短: 如何添加要在 DispForm.aspx 上显示的字段?

任何帮助将不胜感激,我很困难!

谢谢, E

解决方案:

我忘记在我正在使用的列表的内容类型下添加新列。 谢谢您的帮助!

Good Morning,

I have a SharePoint site that I've been trying to fix up for awhile. I haven't had problems adding fields into the NewForm.aspx and EditForm.aspx, but Dispform.aspx seems like a whole different problem.

I've been using SharePoint Designer, and it looks as if all the other fields are displayed using this:

<xsl:value-of select="@Priority"/>

But when I go ahead and follow the same format to try to insert a new field, it continues to pull up empty values when I'm positive something should be there.

SHORT: How can I add fields to display on DispForm.aspx?

Any help would be GREATLY appreciated, I'm so stuck!

Thanks,
E

SOLUTION:

I had forgotten to add my new columns under the Content Type of the List I was using. Thanks for the help!

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

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

发布评论

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

评论(1

我不咬妳我踢妳 2024-07-31 00:02:39

您的方法没问题,需要检查几件事:

1)每个数据视图 Web 部件都有 DataFields 标记,它看起来像这样:

<DataFields>@URL,URL;@Comments,Notes;@Color,Color;@Image,Image;</DataFields>

并且它包含字段的名称。 确保您的新字段显示在此列表中。

2)内部字段名称和字段名称之间也有区别。 在上面的示例中,Comments 是内部名称,但名称是Notes。 因此,要正确显示注释字段,您应该使用:

<xsl:value-of select="@Comments"/>

3) 确保您尝试在 XSLT 模板的正确位置输出该值。 找到该位置的最简单方法是查找现有字段,然后沿着这些字段添加新字段。

希望能帮助到你...

Your approach is okey, couple of things to check:

1) Each Data View Web Part has the DataFields tag, it looks like this:

<DataFields>@URL,URL;@Comments,Notes;@Color,Color;@Image,Image;</DataFields>

and it contains the names of your fields. Make sure your new field is displayed in this list.

2) Also there is difference between internal field name and field name. In the example above Comments is internal name but name is Notes. So to display Notes field correctly you should use:

<xsl:value-of select="@Comments"/>

3) Make sure you are trying to output this value in the right place of XSLT template. The easiest way to find the place is to look for existing fields and just add the new one along these.

Hope it helps...

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