sharepointxsltweb-partscqwp

Limiting Group Items in the Content Query WebPart


Can I Limit Group Items in the Content Query WebPart so that the output is

<h2>Group Header</h2>
<ul>
<li>Item One</li>
<li>Item Two</li>
<li>Item Three</li>
<li>See More</li>
</ul>

I've followed the linked tutorial which works fine, I just can't get the correct output. In particular the two UL tags.


Solution

  • The containing structure (a table with class cbq-layout-main) is defined in ContentQueryMain.xsl file, the OuterTemplate template. However, if you modify it, all of your ContentQueryWebpart-s will be modified.

    So you have to create a custom definition for main query (e.g. ContentQueryMain-cust.xsl), then follow this tutorial: http://www.thesug.org/Blogs/kyles/Lists/Posts/ViewPost.aspx?ID=3&RootFolder=%2FBlogs%2Fkyles%2FLists%2FPosts