Microsoft Enterprise Content Management (ECM) Team Blog : Con...
Popularity Report
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
URL Tag Cloud
- sharepoint
- , cqwp
- , webparts
- , howto
- , xslt
- , ecm
- , customizing
- , customisation
- , WSS
- , ;cqwp
- , nihr
- , contentquerywebpart
- , sp_remember
- , My Link Library
- , sacwebteam
- , script
- , XSL
- , ui
- , branding
Bookmark History
Saved by 19 people (-7 private), first by anonymouse user on 2007-02-05
- Gwiley72 on 2009-05-08 - Tags CQWP , SharePoint , WebParts
- Marjancp on 2009-03-27 - Tags sharepoint
- Cmarkowitz on 2009-03-12 - Tags sharepoint , ;cqwp
- Jeestirling on 2009-02-11 - Tags sharepoint , cqwp
- Mattranlett on 2009-01-05 - Tags sharepoint , cqwp , howto
Public Sticky notes
Hi Marcus, to answer your questions:
1) When you tell the Content Query web part to ask for a set of fields, via CommonViewFields as above, you need to use the internal name of the fields. SharePoint's UI shows you the display name of the fields, but stores the internal name in the DB. Usually the internal name and the display name match, but certain characters (like spaces) are encoded.
An easy way to sneak a peek at what the internal name of a field is: when you visit the Site Column page for a particular column, the URL displays the internal name of the field. In this case it's "field=Body%5Fx0020%5Fcontent", which is just an encoded way of saying "Body_x0020_content".
2) This is one of the quirks of XML/XSL, namely certain characters getting encoded differently when getting passed as XML to the XSL to render. One easy way to see exactly what the XML looks like that the XSL has to render is to insert the markup I have in the example above into your Item Style, and that will render out the field names:
<xsl:for-each select="@*">
P:<xsl:value-of select="name()" />
</xsl:for-each>
This will yield all the fields you can render by their name, including in this case "Body_x005F_x0020_content".
Ian, if you have questions about how you can utilize the web part for your scenarios, feel free to post a comment describing what you're trying to do, and I can give you some pointers.
Highlighted by mhasan
Highlighted by overhols
Highlighted by overhols
Hi, I'm trying the same as Robert: use more than 3 filters.
I'm doing like that:
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
this.QueryOverride = @"<Where><Eq><FieldRef Name=""isFull"" /><Value Type=""Boolean"">0</Value></Eq></Where>";
}
What could be wrong? It doesn't filter anything. Thanks!
Highlighted by overhols
Highlighted by overhols
Highlighted by overhols
Hi Adam,
You can achieve your scenario by extending the CQWP and overriding the "ModifyXsltArgumentList" function to pass a new parameters (List Name) down to the XSLT engine.
protected override void ModifyXsltArgumentList(ArgumentClassWrapper argList)
argList.AddParameter(columnName, namespace, value);
Adri Verlaan [MSFT]
Highlighted by overhols
Highlighted by overhols
Highlighted by overhols


Public Comment