如何将自定义 ItemStyle.xsl 应用于 CQWP

发布于 2024-08-11 23:41:55 字数 670 浏览 8 评论 0原文

我有一个关于将自定义 itemstyle.xsl 应用于 CQWP 的问题。

我提取了现有的 CQWP,将其重命名,然后上传到网站集上的 Web 部件库。

修改后的CQWP Web部件在默认itemstyle.xsl下完全没有问题

之后,我复制了itemstyle.xsl,将其重命名为customitemstyle.xsl,并将其上传到样式库下的“XSL样式表”文件夹并发布了xsl文件。

发布文件后,我在 SPD 中打开修改后的 CQWP(.webpart 文件),然后进行更改以应用修改后的 xsl 文件。下面列出了更改;

   <property name="ItemXslLink" type="string" />/Style Library/XSL Style Sheets/customitemstyle.xsl</property>

上传新的 CQWP 后,我尝试将 CQWP 添加到页面,但收到错误消息,指出无法添加 Web 部件并确保它是正确的 Web 部件文件(.dwp 或 .webpart 文件)并确保 xml 格式正确。

现在我陷入解决错误并将自定义 itemstyle 应用于 CQWP 的困境。

有人可以帮助我吗?我错过了什么吗?

任何意见、指导和方向将不胜感激。

谢谢。

I got a question about applying custom itemstyle.xsl to CQWP.

I extracted existing CQWP, renamed it, and uploaded to webpart gallery on a site collection.

The modified CQWP web part worked with no problem at all under default itemstyle.xsl

After that, i copied itemstyle.xsl, renamed it to customitemstyle.xsl, and uploaded it to 'XSL Style Sheet' folder under Style Library and published the xsl file.

Once i published the file, i opened modified CQWP (.webpart file) in SPD then made a change to get modified xsl file applied. the change is listed below;

   <property name="ItemXslLink" type="string" />/Style Library/XSL Style Sheets/customitemstyle.xsl</property>

After i uploaded the new CQWP, I tried to add the CQWP to a page but got an error saying cannot add webpart and make sure it is correct web part file (.dwp or .webpart file) and make sure the xml is well formed xml.

Now I get stucked to resolve the error and apply custom itemstyle to CQWP.

Can anybody help me? Did I miss anything?

Any comments, guide and direction will be appreciated.

Thank you.

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

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

发布评论

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

评论(1

夜深人未静 2024-08-18 23:41:55

您现在可能已经明白了,但您在帖子中提供的 XML 无效。
属性元素关闭两次:

<property name="ItemXslLink" type="string" />XSL path</property>

首先使用 /> 标签,然后使用 标签。

You've probably figured it out by now, but the XML you have provided in your post isn't valid.
The property element is closed twice:

<property name="ItemXslLink" type="string" />XSL path</property>

First with a />-tag and after that the </property>-tag.

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