Monday, June 11, 2012

Custom Style and Slots in Content Query Web Part (CQWP)


The CQWP allows us to modify or create new styles which help to show custom data.
In addition by Slots we can use custom parameters and show custom fields.

For example:










1.Open CQWP in notepad or VS

2.Find "CommonViewFields"

3.Add custom columns:


Role, Text
Action, Text
Responsibility, Text




4.Open SharePoint Designer and CheckOut of:

/Style Library/XSL Style Sheets/ItemStyle.xsl

5.Insert our new template or modify old one:






















_blank








<tr style="background-color:#f7f3f7;color:#848284">
<td style="font-size:12px;color:black" valign="top">Role</td>
<td style="font-size:12px;color:black" valign="top">Action</td>
<td style="font-size:12px;color:black" valign="top">Responsibility</td>
</tr>























No comments:

Post a Comment