开发者

Content Query WebPart - Grouping by custom column?

We have a LIST of web pages that we use as News items on our Sharepoint 2007 site. On our main page, we have a Content Query WebPart that queries this list, and nicely displays the name, and a few lines of the content. This is taken from our Pages Library that was created as part of our Publishing Template. We would like to "Group" items by categoriezing them (Top Stories, Location-Specific Events, etc) and show them using the Content Query WebPart. We have created a custom column called "News Category" and we would like to group the items inside the Content Query WebPart by this. Unfortunately the Custom Column doesn't show up when sorting through the "Group By" fields.. Is this at all possible, or am I wasting my time? We are not looking to add 3rd party components开发者_JAVA技巧 to our site at this time...


I believe you need to create a Site Column instead of a custom column within the list. You would then need to add that site column to your list. Here's how:

  1. Select Site Actions->Site Settings.
  2. In the Galleries column, select "Site Columns"
  3. Click "Create"
  4. Enter in the relevant information.
  5. In your list, goto Settings -> List Settings.
  6. Select "Add from existing site columns"
  7. Add your column to the list.
  8. In your list, add data to the column as needed.
  9. Back on the page showing your CQWP, modify the shared part.
  10. Select Presentation. Under Group items by, select your site column.


You need to change the CommonViewFields property of your CQWP

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜