I'm creating a CQWP that i want to style without the

<ul class="dfwp-list"> 

... wrapped around it. I know the html is created via a variable inside OuterTemplate but For this QCWP i dont want it to be wrapped. How can i Do this?

1 Answer 1


You can do two things. The first assumes that you need to remove the wrapper b/c of styling issues. If that's the case, then you can use Jquery to iterate through the code to identify the class name and either switch it to something else or pull it out entirely. THis assumes you have a wrapper class or some other sister web part of which you can use to identify this one (so you don't pull out ALL the the dfwp-list classes).

Another thing you could do is create a custom template for the CQWP that doesn't use the UL at all. This is the route I would go. Then create your own template in the copy of header.xsl that doesn't use a UL to wrap the itemstyle.xsl code. I can give you more info on this if it's the route you're interested in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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