开发者

Sharepoint Content Query Webpart untrusted xsl file

I have created a custom xsl file for the Content Query Webpart. I assigned the path of the xsl file to the property "MainXsl" of the CQW. After I put the CQW to a sub sitecollection, it show me the following message: "The web part references an untrusted XSL file. Only XSL files contained in this site's Style Library may be referenced."

I have checked up, there 开发者_如何学Cis my xsl file in the sub sitecollection (Style Library/XSL Style Sheets) and is published.

Please tell me how to solve this problem?


Bit of thread necromancy here, but as this is one of the top Google result for the error message...

I was getting this error even with the XSL file in the site collection's Style Library. To fix, when you reference the XSL file (in my case in the .webpart file), use server-relative path, eg. /sites/[site name]/Style Library/[stylesheet].xsl and all will be well!

EDIT: From @MBentley's comment, you can also use URL tokens, such as ~site/Style Library/[stylesheet].xsl to avoid having to use the absolute URL.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜