deep dive into the content query web part by christina wheeler - sptechcon

18
Deep Dive into the Content Query Web Part Christina Wheeler

Upload: sptechcon

Post on 12-May-2015

4.639 views

Category:

Documents


3 download

DESCRIPTION

Technical Class:

TRANSCRIPT

Page 1: Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon

Deep Dive into the Content Query Web Part

Christina Wheeler

Page 2: Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon

Agenda• Introduction• Content Query Web Part– About the CQWP– How it’s being used– Tips & tricks– How to Customize

Page 3: Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon
Page 4: Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon

About me…

• Christina Wheeler• SharePoint Trainer & Consultant

• B: http://www.thesharepoint411.com

• E: [email protected]

• L: http://www.linkedin.com/in/christinawheeler

• T: @cwheeler76

Page 5: Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon

Publications

SharePoint 2010 Field Guidehttp://bit.ly/Xoxatd

SharePoint 2013 Inside Outhttp://oreil.ly/Wtk2UV

Page 6: Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon

CQWP• Used to aggregate content from SharePoint

lists & libraries from within the current site collection

• Filter by content types• Add additional columns• Presentation styling• Audience Targeting

Page 7: Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon

What’s new?• Dynamic Filters– SharePoint 2007• You had to subclass the CQWP to add dynamic filters

– SharePoint 2010• Filters based off other fields on the page• Or from a value on the QueryString

Page 8: Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon

What’s new?• CommonViewFields– SharePoint 2007• Had to export web part. • Tweak the CommonViewFields property.• Reimport to page to pass additional content

fields down to the XSLT for rendering.– SharePoint 2010• Now exposed in the CQWP’s Editor part

Page 9: Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon

Controlling the Presentation• Use existing Styles from the style gallery• Levels are set using the presentation section in

the tool pane• Create Custom XSL– Conditional Formatting– Key Performance Indicators– Calendar displays

Page 11: Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon

Building the Query• PageFieldValue– Token allows to specify field on page layout and

dynamically replaces value of filter with current page’s field value

• PageQueryString– Use URL query string for a value to use in Query– Example

• Add Query String value to URL (&NewsCategory=Sports”) and set the CQWP’s query to return pages where the News Category field is equal to “Sports”

Page 13: Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon

Building the Query• Supports filtering over the Enterprise

Keywords columns and the “All Tags” column– Allows to look for any

managed metadata tag on a queried item, regardless of which metadata field on the item contains the tag.

Page 16: Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon

Resources• SharePoint 2010 CAML Designer– http://karinebosch.wordpress.com/2012/05/12/caml-design

er/

• Stramit CAML Viewer– http://spcamlviewer.codeplex.com

• Lightning Conductor Web Part– http://www.lightningtools.com

Page 17: Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon

QUESTIONS?

Page 18: Deep Dive into the Content Query Web Part by Christina Wheeler - SPTechCon

Contact Info• Email

[email protected] • Blog

http://www.thesharepoint411.com • Twitter

@cwheeler76 • LinkedIn

http://www.linkedin.com/in/christinawheeler