开发者

How to apply custom ItemStyle.xsl to 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜