Download presentation
Presentation is loading. Please wait.
Published byLaureen Fox Modified over 6 years ago
1
Content Query Web Part March 2013 Peter Serzo SharePoint Fest
3
Twitter: pserzo Peter Serzo, MCP, MCSD .Net, MCTS
High Monkey Consulting Blog: monkeyblog.highmonkey.com Twitter: pserzo Author Love to read and Love a Good Story
4
Outline & Agenda Simple Query/List Outof the Two Lists box
Overrides Outof the box Multiple Files One Source Design XSLT Debugging
6
CQWP – Tour of out of the box features
7
CQWP – Tour of out of the box
features RSS Feeds
8
CQWP – Tour of out of the box
features Audience Targeting
9
CQWP uses 3 xsl files: ContentQueryMain.xsl ItemStyle.xsl Header.xsl
10
CQWP - Simple
11
CQWP - Simple Business Case 1:
Simplywant todisplaycontentsof Announcementson Home Page in an aesthetically pleasing manner.
12
CQWP - Query Business Case 2: Need to pull from 2 different lists: the
Archive listand Regular list
13
CQWP - Query Overrides – Need towrite CAML
Utilize the ListsOverride Property • <property name="ListsOverride" type="string"><![CDATA[<Lists><List ID="3FAD4E57-6DF2- 49EF-862E-6A0A671F2772"/><List ID="9B2BAD6C-EF0F- 42B6-A5E7-90DB92EAA12C"/></Lists>]]></property>
14
CQWP – What other Overrides are important
<property name="ViewFieldsOverride" type="string"><![CDATA[<FieldRef Name="Title" Nullable="True" Type="Text"/><FieldRef Name="PublishingRollupImage" Nullable="True" Type="PublishingPageImage"/><FieldRef Name="FileRef" Nullable="True" Type="Lookup"/><FieldRef Name="Headline" Nullable="True" Type="Text"/><FieldRef Name="PublishingStartDate" Nullable="True" Type="DateTime"/><FieldRef Name="ArticleHasComments" Nullable="True" Type="Boolean"/>]]></property> <property name="QueryOverride" type="string"><![CDATA[<Where><Eq><FieldRef Name='Regional_x0020_Focus'/><Value Type='Choice'>Asia Pacific and Africa</Value></Eq></Where><OrderBy><FieldRef Name='PublishingStartDate' Ascending='False' /></OrderBy>]]></property>
15
Use U2U CamlDesigner for Query Overrides
16
CQWP – Multiple Files Business Case 3
Customer has several subsitesand wants to load a fileon oneand have it show upon the others.
17
CQWP – Multiple Files Review
Create 3 Subsites 1. 2. Create Customcolumns 3. Create ContentType (Movies) 4. Create Document Library Add Content type 5. Add CQWP 6. Set Parameters
18
CQWP - Design Business Case 4:
Customer wants a custom design for the web part called Feature Movie. And they want to pick the feature movie.
19
CQWP - Design You need SharePoint Designer!
20
Debugging XSLT Justwriting this because I always seem to be looking for it. This shows you what properties/fieldsand thevalues of these fields in thexsl when you are trying to render in a content querywebpart oradataview webpart. <xsl:for-each Property Name: <xsl:value-of select="name()"/> Value: <xsl:value-of select="." /> <br/> </xsl:for-each>
21
CQWP – Limitations and SQL Server Gotchas…
• Site Collection Silos • Large Amtof Metadata in a List • How manyon a page – Use Query Overrides
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.