0

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.

Frank
  • 269
  • 1
  • 2
  • 8

1 Answers1

0

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

naivists
  • 32,681
  • 5
  • 61
  • 85
  • Thanks naivists. I already had made a copy of the main.xsl. The issue was that putting in the
      tags would make it appear above the

      header when editing the main.xsl. I'll have another look and see if I've missed something. cheers

    – Frank Mar 26 '12 at 22:39
  • Ok I figured it out, I was updating the main.xsl which was failing becuase the xml mark up was not valid even though the ouput would have been. To get around this I needed to use <div class='block'> – Frank Mar 27 '12 at 21:49
  • 1
    I did a quick post if anyone wants to know what I ended up doing http://udigg.com.au/?p=163 – Frank Mar 29 '12 at 02:11