Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have done a fair amount of experminting with this but cannot get it to work and I'm now looking for pointers or working examples.

I want to customise the output of the Content Query Web Part to remove the:

<li class="dfwp-item"> </li> 

tags that wrap each item of the CQWP.

I know that these are stored in the ContentQueryMain.xsl and I can see the variable (correct me if I'm wrong) that defines these opening and closing tags at the top of ContentQueryMain.xsl

<xsl:variable name="BeginListItem" select="string('&lt;li class=&quot;dfwp-item&quot;&gt;')" />
<xsl:variable name="EndListItem" select="string('&lt;/li&gt;')" />

The problem is when I point an exported CQWP at a duplicate of the ContentQueryMain.xsl I get the generic this WebPart cannot display/render error and I'm stumped as to where to look. I figure it could be syntax or it could be that when overriding such a fundamental part it needs a little more care and attention.

Any ideas?

Thanks

share|improve this question
    
are you doing .wsp deployment, or editing a page/view/form via SharePoint Designer? –  bkwdesign Jan 3 '13 at 19:07
    
I have been exporting a clean CQWP, opening it in Notepad and changing the MainXSL and ItemXSL properties to look at duplicate XSL Stylesheets in the root Style Library. I've been having quite a lot of success just pointing at a different ItemStyle.xsl but it all goes nuts when I alter MainXSL. I will then import or add it to the Web Part Gallery and then insert it in the page. –  mtwelve Jan 3 '13 at 23:44
    
Do you have access to the server logs? Check 14\LOGS and see if any errors are logged at the same time. Also, if you don't have it turned on already, enable the developer dashboard and view the trace log for the page. See here to enable to the dashboard: blogs.technet.com/b/speschka/archive/2009/10/28/… –  Vadim Gremyachev Jan 6 '13 at 19:17
    
To be more specific the page will load ok with the custom WebPart but when I goto edit the WebPart properties to specify where to pull the items from and display in the custom style I get the error page offering me the Maintence Page...? There is plenty of content on the Dashboard that seems to be replicated in the ULS but I dont really know where to begin. –  mtwelve Jan 21 '13 at 12:39
add comment

1 Answer

Noticed a post on MSDN related to this very issue. His workaround sounds similar to what you've done, except he makes copies of files into a sub dir:

create a new Folder under XSL Style Sheets and just get the copy of both ContentQueryMain.xsl and ItemStyle.xsl to the newly created folder. After that [make changes] for BeginList, EndList, BeginListItem and EndListItem

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.