SlideShare une entreprise Scribd logo
1  sur  35
Content Query Web Part –
 Get it all in one place and
 style it!




                                        Benjamin Niaulin
Presented at: SharePoint Fest Chicago        SharePoint Geek
Description


 More than once people have customized or developed a
 solution or web part to accommodate certain needs. Many
 times, these needs could have been met with a simple Out-of-
 the-Box Web Part called the Content Query Web Part. In this
 session we will explore the possibilities of querying the right
 content as well as changing the style to display these results.




@bniaulin                                              Share-gate.com
Who is this guy talking?
 Benjamin Niaulin
   Speaker, Trainer, Consultant, SCRUM Master
   Blog
  bniaulin.wordpress.com
   Website
  share-gate.com
   Email
  benjamin.niaulin@share-gate.com
   TWITTER!: @bniaulin



 @bniaulin                                      Share-gate.com
Agenda
   Introduction
   The Content Query Web Part
   DEMO
   The XSL Files – What is that? What do they do?
   DEMO
   Dynamic Filtering
   DEMO
   Advanced CQWP Stuff




@bniaulin                                           Share-gate.com
INTRODUCTION
Problems we face

   Showing data from multiple lists/libraries at the same time

   Change the date format in a list/library

   Dynamic filtering

   Changing the look of a list/library

   Showing specific data from lists/libraries to the relevant
   audience




@bniaulin                                               Share-gate.com
CONTENT QUERY
     Web Part - Overview
Content Query Web Part (CQWP)
   Requires Site Collection Feature: Publishing Infrastructure*


   Helps create dynamic views based on what the user is
   looking at
   Power User can Edit the
   Query and the Style
   Aggregate content from
   the Site Collection
   Reusable and customizable
   styles


@bniaulin                                             Share-gate.com
Web Part Properties - Query
   Query
     Source
     List Type
     Content Type
     Audience Targeting
     Additional Filters




@bniaulin                     Share-gate.com
Web Part Properties - Presentation
   Presentation
      Grouping and Sorting
      Sorting
      Item Limit
      Styles
      Fields to display
      Feed <-- Don’t underestimate!




@bniaulin                             Share-gate.com
Examples


  By Ben Tedder on NBSP




                                   http://labs.steveottenad.com/sharepoint-
                                   2010-xslt-date-formatting/


  By Yohan Belval from Sharegate




@bniaulin                                         Share-gate.com
DEMO
XSL FILES – HUH?
Understanding XSLT
   XSLT: Extensible Stylesheet Language Transformations
     Basically transforms XML




                                             Ref: http://en.wikipedia.org/wiki/XSLT



@bniaulin                                                  Share-gate.com
Understanding XSLT
  Debug itemstyle:
     <xsl:template name="Debug"
match="Row[@Style='Debug']" mode="itemstyle">
             <xsl:for-each select="@*">
        P:<xsl:value-of select="name()" />
             </xsl:for-each>
     </xsl:template>

   Learn xslt:
   http://www.w3schools.com/xsl/default.asp


@bniaulin                                       Share-gate.com
Display RAW Data of Query
<xsl:template name="DisplayRawData"
match="Row[@Style='DisplayRawData']" mode="itemstyle">
<xsl:for-each select="@*">
<xsl:value-of select="name()"/>
<xsl:text> = </xsl:text>
<xsl:value-of select="."/><br/>
</xsl:for-each>
<br/><br/><br/>
</xsl:template>




@bniaulin                                                Share-gate.com
XSL Files used by SharePoint
   There are 3 files used by the CQWP
       ContentQueryMain.xsl
       ItemStyle.xsl
       Header.xsl
   Files are located in the Style Library at the Root of your
   Site Collection
       Style LibraryXSL Style Sheets




@bniaulin                                               Share-gate.com
ContentQueryMain.xsl
   Contains logic that generates the appropriate calls to the
   Header and Item templates for each item.
   Contains functions that help designers modify the Item and
   Header XSLT transforms.
   Receives all the content, parses it, and sends appropriate
   pieces to the ItemStyle and Header templates.
   Maintains the structure of the Content By Query Web Part.
   Stores data retrieved when querying content in the
   path /dsQueryResponse/Rows/Row.
   MSDN Definition
                                                 In short….

@bniaulin                                            Share-gate.com
ContentQueryMain.xsl
   Think of it as the big container of the WebPart
   In charge of what isn’t repeated (header, footer, calling
   CSS or JS to be used in your itemstyle after)
   It controls the flow of the content it receives




              Let’s check it out




@bniaulin                                               Share-gate.com
Header.xsl
   Contains templates that define how to display a header and
   ensure the consistency of group headers.
   Templates specified in Header.xsl receive the next item row
   to process, usually the first row in a group unless there are
   multiple columns. If there are multiple columns, the
   templates receive the first row of the column.
   You can retrieve data about the next item row by using
   the @Property directive. You can use
   the $Group parameter that contains the groupby column
   name and the $GroupType that represents the column type
   of the groupby column.
   MSDN Definition
                                                  In short….

@bniaulin                                              Share-gate.com
Header.xsl
   When you use the CQWP with a GroupBy option the
   header.xsl is called.




@bniaulin                                       Share-gate.com
Itemstyle.xsl
    Contains templates that define how to display an item.
    These templates receive and process one row of data at a
    time, ensuring that the style and data in the item rows is
    consistent.
    You can retrieve data about a row by using
    the @Property directive.

    Basically it’s what gets applied to each “item” or row.

     <div class="right">
      <span class="title"><xsl:value-of select="@Title" /></span>
      <span class="location">Location: <xsl:value-of select="@Location" /></span>




 @bniaulin                                                                          Share-gate.com
Examples




@bniaulin   Share-gate.com
DEMO
DYNAMIC FILTERING
Dynamic Filters
   PageFieldValue
      Specify a field on the Page Layout to act as the filter for
      the Query
   PageQueryString
      Takes the value in the URL and applies it as the filter for
      the Query




@bniaulin                                               Share-gate.com
Example on MSDN BLog




Ref: MSDN Blog

@bniaulin              Share-gate.com
More




http://www.chakkaradeep.com/image.axd?picture=image_319.png




 @bniaulin                                                    Share-gate.com
ADVANCED PROPERTIES
Access the Advanced
Properties
   You can easily access advanced properties of the CQWP
   Edit Web Part
      Export into .webpart file
      Open with an XML editor (notepad, etc.)
      Modify the file
      Import .webpart back into your site




@bniaulin                                         Share-gate.com
More Advanced Stuff
   CommonViewFields
     Ask for additional fields
     By default the CQWP does not return all fields
     automatically
   QueryOverride
     When used, all settings for Query in the UI are greyed
     out
     Makes it possible to specify the query portion of a
     cross-list query in CAML.




@bniaulin                                            Share-gate.com
Still More Advanced Properties…
   WebsOverride
       Determines whether the cross-list query should recurse
       subsites.
   ListsOverride
       Specify which lists/library you want to query
<property name="ListsOverride" type="string"><![CDATA[<Lists><List ID="31A7C09D-52CC-
4585-B998-A3F180A9BD07"/><List ID="7382D66D-2E4C-47CB-A95C-
5EECD68F5E61"/></Lists> ]]></property>




@bniaulin                                                                Share-gate.com
DEMO
   Filter by File Extension
Q&A
THANK YOU!
KEEP IN TOUCH ON TWITTER @BNIAULIN




            Benjamin Niaulin



@bniaulin                            Share-gate.com

Contenu connexe

Tendances

SPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITProsSPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITProsPaul Hunt
 
SEF2013 - Create a Business Solution, Step by Step, with No Managed Code
SEF2013 - Create a Business Solution, Step by Step, with No Managed CodeSEF2013 - Create a Business Solution, Step by Step, with No Managed Code
SEF2013 - Create a Business Solution, Step by Step, with No Managed CodeMarc D Anderson
 
Transform SharePoint default list forms with HTML, CSS and JavaScript
Transform SharePoint default list forms with HTML, CSS and JavaScriptTransform SharePoint default list forms with HTML, CSS and JavaScript
Transform SharePoint default list forms with HTML, CSS and JavaScriptJohn Calvert
 
Intro to SharePoint Web Services
Intro to SharePoint Web ServicesIntro to SharePoint Web Services
Intro to SharePoint Web ServicesMark Rackley
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery GuideMark Rackley
 
Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Eric Overfield
 
SPTechCon Boston 2015 - Overcoming SharePoint Limitations
SPTechCon Boston 2015 - Overcoming SharePoint LimitationsSPTechCon Boston 2015 - Overcoming SharePoint Limitations
SPTechCon Boston 2015 - Overcoming SharePoint LimitationsMark Rackley
 
SPCA2013 - Content Search Web Part
SPCA2013 - Content Search Web PartSPCA2013 - Content Search Web Part
SPCA2013 - Content Search Web PartNCCOMMS
 
A Power User's Intro to jQuery Awesomeness in SharePoint
A Power User's Intro to jQuery Awesomeness in SharePointA Power User's Intro to jQuery Awesomeness in SharePoint
A Power User's Intro to jQuery Awesomeness in SharePointMark Rackley
 
SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014Mark Rackley
 
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesTulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesMark Rackley
 
Transform SharePoint List Forms with HTML and CSS
Transform SharePoint List Forms with HTML and CSSTransform SharePoint List Forms with HTML and CSS
Transform SharePoint List Forms with HTML and CSSJohn Calvert
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14Mark Rackley
 
SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 Mark Rackley
 
Introduction to StratusForms #SayNoToInfoPath
Introduction to StratusForms #SayNoToInfoPathIntroduction to StratusForms #SayNoToInfoPath
Introduction to StratusForms #SayNoToInfoPathMark Rackley
 
Developing and Deploying Custom Branding Solutions in SharePoint 2010
Developing and Deploying Custom Branding Solutions in SharePoint 2010Developing and Deploying Custom Branding Solutions in SharePoint 2010
Developing and Deploying Custom Branding Solutions in SharePoint 2010jhendrix88
 
SPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuerySPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQueryMark Rackley
 
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePointSPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePointMark Rackley
 
SPTechCon Dev Days - Third Party jQuery Libraries
SPTechCon Dev Days - Third Party jQuery LibrariesSPTechCon Dev Days - Third Party jQuery Libraries
SPTechCon Dev Days - Third Party jQuery LibrariesMark Rackley
 

Tendances (20)

SharePoint Performance
SharePoint PerformanceSharePoint Performance
SharePoint Performance
 
SPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITProsSPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITPros
 
SEF2013 - Create a Business Solution, Step by Step, with No Managed Code
SEF2013 - Create a Business Solution, Step by Step, with No Managed CodeSEF2013 - Create a Business Solution, Step by Step, with No Managed Code
SEF2013 - Create a Business Solution, Step by Step, with No Managed Code
 
Transform SharePoint default list forms with HTML, CSS and JavaScript
Transform SharePoint default list forms with HTML, CSS and JavaScriptTransform SharePoint default list forms with HTML, CSS and JavaScript
Transform SharePoint default list forms with HTML, CSS and JavaScript
 
Intro to SharePoint Web Services
Intro to SharePoint Web ServicesIntro to SharePoint Web Services
Intro to SharePoint Web Services
 
(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide
 
Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365
 
SPTechCon Boston 2015 - Overcoming SharePoint Limitations
SPTechCon Boston 2015 - Overcoming SharePoint LimitationsSPTechCon Boston 2015 - Overcoming SharePoint Limitations
SPTechCon Boston 2015 - Overcoming SharePoint Limitations
 
SPCA2013 - Content Search Web Part
SPCA2013 - Content Search Web PartSPCA2013 - Content Search Web Part
SPCA2013 - Content Search Web Part
 
A Power User's Intro to jQuery Awesomeness in SharePoint
A Power User's Intro to jQuery Awesomeness in SharePointA Power User's Intro to jQuery Awesomeness in SharePoint
A Power User's Intro to jQuery Awesomeness in SharePoint
 
SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014
 
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesTulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
 
Transform SharePoint List Forms with HTML and CSS
Transform SharePoint List Forms with HTML and CSSTransform SharePoint List Forms with HTML and CSS
Transform SharePoint List Forms with HTML and CSS
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14
 
SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013
 
Introduction to StratusForms #SayNoToInfoPath
Introduction to StratusForms #SayNoToInfoPathIntroduction to StratusForms #SayNoToInfoPath
Introduction to StratusForms #SayNoToInfoPath
 
Developing and Deploying Custom Branding Solutions in SharePoint 2010
Developing and Deploying Custom Branding Solutions in SharePoint 2010Developing and Deploying Custom Branding Solutions in SharePoint 2010
Developing and Deploying Custom Branding Solutions in SharePoint 2010
 
SPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuerySPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuery
 
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePointSPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
 
SPTechCon Dev Days - Third Party jQuery Libraries
SPTechCon Dev Days - Third Party jQuery LibrariesSPTechCon Dev Days - Third Party jQuery Libraries
SPTechCon Dev Days - Third Party jQuery Libraries
 

En vedette

True Confessions of Host named site collections in SharePoint 2013
True Confessions of Host named site collections in SharePoint 2013True Confessions of Host named site collections in SharePoint 2013
True Confessions of Host named site collections in SharePoint 2013Bonnie Springer
 
Exploring the New Search in SharePoint 2013 - What can you do now?
Exploring the New Search in SharePoint 2013 - What can you do now?Exploring the New Search in SharePoint 2013 - What can you do now?
Exploring the New Search in SharePoint 2013 - What can you do now?Benjamin Niaulin
 
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010Benjamin Niaulin
 
Understanding SharePoint Content Types
Understanding SharePoint Content TypesUnderstanding SharePoint Content Types
Understanding SharePoint Content TypesBenjamin Niaulin
 
Stop Updating, Start Evolving - The Digital Workplace Truth
Stop Updating, Start Evolving - The Digital Workplace TruthStop Updating, Start Evolving - The Digital Workplace Truth
Stop Updating, Start Evolving - The Digital Workplace TruthBenjamin Niaulin
 
Understand the SharePoint Basics
Understand the SharePoint BasicsUnderstand the SharePoint Basics
Understand the SharePoint BasicsBenjamin Niaulin
 
Cool Dashboards and Visualizations for SharePoint Power Users
Cool Dashboards and Visualizations for SharePoint Power UsersCool Dashboards and Visualizations for SharePoint Power Users
Cool Dashboards and Visualizations for SharePoint Power UsersBenjamin Niaulin
 
Discover SharePoint 2016 Preview and the Vision
Discover SharePoint 2016 Preview and the VisionDiscover SharePoint 2016 Preview and the Vision
Discover SharePoint 2016 Preview and the VisionBenjamin Niaulin
 
10 Reasons your SharePoint Migration Failed
10 Reasons your SharePoint Migration Failed10 Reasons your SharePoint Migration Failed
10 Reasons your SharePoint Migration FailedBenjamin Niaulin
 
Step into the SharePoint branding world, tools and techniques
Step into the SharePoint branding world, tools and techniquesStep into the SharePoint branding world, tools and techniques
Step into the SharePoint branding world, tools and techniquesBenjamin Niaulin
 
Don't Suck at SharePoint - Avoid the common mistakes
Don't Suck at SharePoint - Avoid the common mistakesDon't Suck at SharePoint - Avoid the common mistakes
Don't Suck at SharePoint - Avoid the common mistakesBenjamin Niaulin
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien
 
Document Management in SharePoint without folders - Introduction to Metadata
Document Management in SharePoint without folders - Introduction to MetadataDocument Management in SharePoint without folders - Introduction to Metadata
Document Management in SharePoint without folders - Introduction to MetadataGregory Zelfond
 

En vedette (13)

True Confessions of Host named site collections in SharePoint 2013
True Confessions of Host named site collections in SharePoint 2013True Confessions of Host named site collections in SharePoint 2013
True Confessions of Host named site collections in SharePoint 2013
 
Exploring the New Search in SharePoint 2013 - What can you do now?
Exploring the New Search in SharePoint 2013 - What can you do now?Exploring the New Search in SharePoint 2013 - What can you do now?
Exploring the New Search in SharePoint 2013 - What can you do now?
 
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
Re-Experience SharePoint: Interface Enhancements in SharePoint 2010
 
Understanding SharePoint Content Types
Understanding SharePoint Content TypesUnderstanding SharePoint Content Types
Understanding SharePoint Content Types
 
Stop Updating, Start Evolving - The Digital Workplace Truth
Stop Updating, Start Evolving - The Digital Workplace TruthStop Updating, Start Evolving - The Digital Workplace Truth
Stop Updating, Start Evolving - The Digital Workplace Truth
 
Understand the SharePoint Basics
Understand the SharePoint BasicsUnderstand the SharePoint Basics
Understand the SharePoint Basics
 
Cool Dashboards and Visualizations for SharePoint Power Users
Cool Dashboards and Visualizations for SharePoint Power UsersCool Dashboards and Visualizations for SharePoint Power Users
Cool Dashboards and Visualizations for SharePoint Power Users
 
Discover SharePoint 2016 Preview and the Vision
Discover SharePoint 2016 Preview and the VisionDiscover SharePoint 2016 Preview and the Vision
Discover SharePoint 2016 Preview and the Vision
 
10 Reasons your SharePoint Migration Failed
10 Reasons your SharePoint Migration Failed10 Reasons your SharePoint Migration Failed
10 Reasons your SharePoint Migration Failed
 
Step into the SharePoint branding world, tools and techniques
Step into the SharePoint branding world, tools and techniquesStep into the SharePoint branding world, tools and techniques
Step into the SharePoint branding world, tools and techniques
 
Don't Suck at SharePoint - Avoid the common mistakes
Don't Suck at SharePoint - Avoid the common mistakesDon't Suck at SharePoint - Avoid the common mistakes
Don't Suck at SharePoint - Avoid the common mistakes
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
 
Document Management in SharePoint without folders - Introduction to Metadata
Document Management in SharePoint without folders - Introduction to MetadataDocument Management in SharePoint without folders - Introduction to Metadata
Document Management in SharePoint without folders - Introduction to Metadata
 

Similaire à Content query web part – get it all in one place and style it!

DSpace 4.2 XMLUI Theming
DSpace 4.2 XMLUI ThemingDSpace 4.2 XMLUI Theming
DSpace 4.2 XMLUI ThemingDuraSpace
 
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrienCustomizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrienChris O'Brien
 
What is struts_en
What is struts_enWhat is struts_en
What is struts_entechbed
 
HTML and CSS Coding Standards
HTML and CSS Coding StandardsHTML and CSS Coding Standards
HTML and CSS Coding StandardsSaajan Maharjan
 
Introduction to Content Search Web Part
Introduction to Content Search Web PartIntroduction to Content Search Web Part
Introduction to Content Search Web PartHaaron Gonzalez
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance TopicsAli Taki
 
HTL(Sightly) - All you need to know
HTL(Sightly) - All you need to knowHTL(Sightly) - All you need to know
HTL(Sightly) - All you need to knowPrabhdeep Singh
 
Webcast: Balancing standardization against the need for creativity
Webcast: Balancing standardization against the need for creativityWebcast: Balancing standardization against the need for creativity
Webcast: Balancing standardization against the need for creativityScriptorium Publishing
 
Building a Web Template on The Ball / OIP
Building a Web Template on The Ball / OIPBuilding a Web Template on The Ball / OIP
Building a Web Template on The Ball / OIPKallex
 
Django workshop : let's make a blog
Django workshop : let's make a blogDjango workshop : let's make a blog
Django workshop : let's make a blogPierre Sudron
 
Spca2014 search workshop niaulin
Spca2014 search workshop niaulinSpca2014 search workshop niaulin
Spca2014 search workshop niaulinNCCOMMS
 
Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015Tobias Mattsson
 
Introduction to whats new in css3
Introduction to whats new in css3Introduction to whats new in css3
Introduction to whats new in css3Usman Mehmood
 
Building services using windows azure
Building services using windows azureBuilding services using windows azure
Building services using windows azureSuliman AlBattat
 
Build killer visuals to interact with your content using Search and Display T...
Build killer visuals to interact with your content using Search and Display T...Build killer visuals to interact with your content using Search and Display T...
Build killer visuals to interact with your content using Search and Display T...ShareGate
 

Similaire à Content query web part – get it all in one place and style it! (20)

DSpace 4.2 XMLUI Theming
DSpace 4.2 XMLUI ThemingDSpace 4.2 XMLUI Theming
DSpace 4.2 XMLUI Theming
 
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrienCustomizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
 
What is struts_en
What is struts_enWhat is struts_en
What is struts_en
 
HTML and CSS Coding Standards
HTML and CSS Coding StandardsHTML and CSS Coding Standards
HTML and CSS Coding Standards
 
Introduction to Content Search Web Part
Introduction to Content Search Web PartIntroduction to Content Search Web Part
Introduction to Content Search Web Part
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance Topics
 
Angular JS
Angular JSAngular JS
Angular JS
 
HTL(Sightly) - All you need to know
HTL(Sightly) - All you need to knowHTL(Sightly) - All you need to know
HTL(Sightly) - All you need to know
 
Oracle XML DB - What's in it for me?
Oracle XML DB - What's in it for me?Oracle XML DB - What's in it for me?
Oracle XML DB - What's in it for me?
 
Webcast: Balancing standardization against the need for creativity
Webcast: Balancing standardization against the need for creativityWebcast: Balancing standardization against the need for creativity
Webcast: Balancing standardization against the need for creativity
 
Building a Web Template on The Ball / OIP
Building a Web Template on The Ball / OIPBuilding a Web Template on The Ball / OIP
Building a Web Template on The Ball / OIP
 
ppt.ppt
ppt.pptppt.ppt
ppt.ppt
 
Django workshop : let's make a blog
Django workshop : let's make a blogDjango workshop : let's make a blog
Django workshop : let's make a blog
 
Spca2014 search workshop niaulin
Spca2014 search workshop niaulinSpca2014 search workshop niaulin
Spca2014 search workshop niaulin
 
Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015
 
treeview
treeviewtreeview
treeview
 
treeview
treeviewtreeview
treeview
 
Introduction to whats new in css3
Introduction to whats new in css3Introduction to whats new in css3
Introduction to whats new in css3
 
Building services using windows azure
Building services using windows azureBuilding services using windows azure
Building services using windows azure
 
Build killer visuals to interact with your content using Search and Display T...
Build killer visuals to interact with your content using Search and Display T...Build killer visuals to interact with your content using Search and Display T...
Build killer visuals to interact with your content using Search and Display T...
 

Plus de Benjamin Niaulin

SPC Master Power User SharePoint & Office 365
SPC Master Power User SharePoint & Office 365SPC Master Power User SharePoint & Office 365
SPC Master Power User SharePoint & Office 365Benjamin Niaulin
 
SharePoint Security Management - Lessons Learned
SharePoint Security Management - Lessons LearnedSharePoint Security Management - Lessons Learned
SharePoint Security Management - Lessons LearnedBenjamin Niaulin
 
SharePoint Governance - No one should carry the burden alone
SharePoint Governance - No one should carry the burden aloneSharePoint Governance - No one should carry the burden alone
SharePoint Governance - No one should carry the burden aloneBenjamin Niaulin
 
Demystify OneDrive for Business - The Good and the Bad
Demystify OneDrive for Business - The Good and the BadDemystify OneDrive for Business - The Good and the Bad
Demystify OneDrive for Business - The Good and the BadBenjamin Niaulin
 
How to use a SharePoint Team Site effectively for Collaboration
How to use a SharePoint Team Site effectively for CollaborationHow to use a SharePoint Team Site effectively for Collaboration
How to use a SharePoint Team Site effectively for CollaborationBenjamin Niaulin
 
What's new in SharePoint 2013 - Discover it
What's new in SharePoint 2013 - Discover itWhat's new in SharePoint 2013 - Discover it
What's new in SharePoint 2013 - Discover itBenjamin Niaulin
 
Build Killer Visuals with SharePoint 2013 Search & Display Templates
Build Killer Visuals with SharePoint 2013 Search & Display TemplatesBuild Killer Visuals with SharePoint 2013 Search & Display Templates
Build Killer Visuals with SharePoint 2013 Search & Display TemplatesBenjamin Niaulin
 
Should you migrate to SharePoint 2013?
Should you migrate to SharePoint 2013?Should you migrate to SharePoint 2013?
Should you migrate to SharePoint 2013?Benjamin Niaulin
 
SharePoint Saturday Twin Cities - Another Hit!
SharePoint Saturday Twin Cities - Another Hit!SharePoint Saturday Twin Cities - Another Hit!
SharePoint Saturday Twin Cities - Another Hit!Benjamin Niaulin
 
Comprendre la recherche dans SharePoint
Comprendre la recherche dans SharePointComprendre la recherche dans SharePoint
Comprendre la recherche dans SharePointBenjamin Niaulin
 
Mieux comprendre SharePoint 2013
Mieux comprendre SharePoint 2013Mieux comprendre SharePoint 2013
Mieux comprendre SharePoint 2013Benjamin Niaulin
 
SPUG Montreal: Comment personnaliser SharePoint a votre image
SPUG Montreal: Comment personnaliser SharePoint a votre imageSPUG Montreal: Comment personnaliser SharePoint a votre image
SPUG Montreal: Comment personnaliser SharePoint a votre imageBenjamin Niaulin
 
Understanding SharePoint site structure what's inside
Understanding SharePoint site structure  what's insideUnderstanding SharePoint site structure  what's inside
Understanding SharePoint site structure what's insideBenjamin Niaulin
 

Plus de Benjamin Niaulin (14)

SPC Master Power User SharePoint & Office 365
SPC Master Power User SharePoint & Office 365SPC Master Power User SharePoint & Office 365
SPC Master Power User SharePoint & Office 365
 
SharePoint Security Management - Lessons Learned
SharePoint Security Management - Lessons LearnedSharePoint Security Management - Lessons Learned
SharePoint Security Management - Lessons Learned
 
SharePoint Governance - No one should carry the burden alone
SharePoint Governance - No one should carry the burden aloneSharePoint Governance - No one should carry the burden alone
SharePoint Governance - No one should carry the burden alone
 
Demystify OneDrive for Business - The Good and the Bad
Demystify OneDrive for Business - The Good and the BadDemystify OneDrive for Business - The Good and the Bad
Demystify OneDrive for Business - The Good and the Bad
 
How to use a SharePoint Team Site effectively for Collaboration
How to use a SharePoint Team Site effectively for CollaborationHow to use a SharePoint Team Site effectively for Collaboration
How to use a SharePoint Team Site effectively for Collaboration
 
What's new in SharePoint 2013 - Discover it
What's new in SharePoint 2013 - Discover itWhat's new in SharePoint 2013 - Discover it
What's new in SharePoint 2013 - Discover it
 
Build Killer Visuals with SharePoint 2013 Search & Display Templates
Build Killer Visuals with SharePoint 2013 Search & Display TemplatesBuild Killer Visuals with SharePoint 2013 Search & Display Templates
Build Killer Visuals with SharePoint 2013 Search & Display Templates
 
Should you migrate to SharePoint 2013?
Should you migrate to SharePoint 2013?Should you migrate to SharePoint 2013?
Should you migrate to SharePoint 2013?
 
SharePoint Saturday Twin Cities - Another Hit!
SharePoint Saturday Twin Cities - Another Hit!SharePoint Saturday Twin Cities - Another Hit!
SharePoint Saturday Twin Cities - Another Hit!
 
Discover SharePoint 2013
Discover SharePoint 2013Discover SharePoint 2013
Discover SharePoint 2013
 
Comprendre la recherche dans SharePoint
Comprendre la recherche dans SharePointComprendre la recherche dans SharePoint
Comprendre la recherche dans SharePoint
 
Mieux comprendre SharePoint 2013
Mieux comprendre SharePoint 2013Mieux comprendre SharePoint 2013
Mieux comprendre SharePoint 2013
 
SPUG Montreal: Comment personnaliser SharePoint a votre image
SPUG Montreal: Comment personnaliser SharePoint a votre imageSPUG Montreal: Comment personnaliser SharePoint a votre image
SPUG Montreal: Comment personnaliser SharePoint a votre image
 
Understanding SharePoint site structure what's inside
Understanding SharePoint site structure  what's insideUnderstanding SharePoint site structure  what's inside
Understanding SharePoint site structure what's inside
 

Dernier

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 

Dernier (20)

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

Content query web part – get it all in one place and style it!

  • 1. Content Query Web Part – Get it all in one place and style it! Benjamin Niaulin Presented at: SharePoint Fest Chicago SharePoint Geek
  • 2. Description More than once people have customized or developed a solution or web part to accommodate certain needs. Many times, these needs could have been met with a simple Out-of- the-Box Web Part called the Content Query Web Part. In this session we will explore the possibilities of querying the right content as well as changing the style to display these results. @bniaulin Share-gate.com
  • 3. Who is this guy talking? Benjamin Niaulin Speaker, Trainer, Consultant, SCRUM Master Blog bniaulin.wordpress.com Website share-gate.com Email benjamin.niaulin@share-gate.com TWITTER!: @bniaulin @bniaulin Share-gate.com
  • 4. Agenda Introduction The Content Query Web Part DEMO The XSL Files – What is that? What do they do? DEMO Dynamic Filtering DEMO Advanced CQWP Stuff @bniaulin Share-gate.com
  • 6. Problems we face Showing data from multiple lists/libraries at the same time Change the date format in a list/library Dynamic filtering Changing the look of a list/library Showing specific data from lists/libraries to the relevant audience @bniaulin Share-gate.com
  • 7. CONTENT QUERY Web Part - Overview
  • 8. Content Query Web Part (CQWP) Requires Site Collection Feature: Publishing Infrastructure* Helps create dynamic views based on what the user is looking at Power User can Edit the Query and the Style Aggregate content from the Site Collection Reusable and customizable styles @bniaulin Share-gate.com
  • 9. Web Part Properties - Query Query Source List Type Content Type Audience Targeting Additional Filters @bniaulin Share-gate.com
  • 10. Web Part Properties - Presentation Presentation Grouping and Sorting Sorting Item Limit Styles Fields to display Feed <-- Don’t underestimate! @bniaulin Share-gate.com
  • 11. Examples By Ben Tedder on NBSP http://labs.steveottenad.com/sharepoint- 2010-xslt-date-formatting/ By Yohan Belval from Sharegate @bniaulin Share-gate.com
  • 12. DEMO
  • 14. Understanding XSLT XSLT: Extensible Stylesheet Language Transformations Basically transforms XML Ref: http://en.wikipedia.org/wiki/XSLT @bniaulin Share-gate.com
  • 15. Understanding XSLT Debug itemstyle: <xsl:template name="Debug" match="Row[@Style='Debug']" mode="itemstyle"> <xsl:for-each select="@*"> P:<xsl:value-of select="name()" /> </xsl:for-each> </xsl:template> Learn xslt: http://www.w3schools.com/xsl/default.asp @bniaulin Share-gate.com
  • 16. Display RAW Data of Query <xsl:template name="DisplayRawData" match="Row[@Style='DisplayRawData']" mode="itemstyle"> <xsl:for-each select="@*"> <xsl:value-of select="name()"/> <xsl:text> = </xsl:text> <xsl:value-of select="."/><br/> </xsl:for-each> <br/><br/><br/> </xsl:template> @bniaulin Share-gate.com
  • 17. XSL Files used by SharePoint There are 3 files used by the CQWP ContentQueryMain.xsl ItemStyle.xsl Header.xsl Files are located in the Style Library at the Root of your Site Collection Style LibraryXSL Style Sheets @bniaulin Share-gate.com
  • 18. ContentQueryMain.xsl Contains logic that generates the appropriate calls to the Header and Item templates for each item. Contains functions that help designers modify the Item and Header XSLT transforms. Receives all the content, parses it, and sends appropriate pieces to the ItemStyle and Header templates. Maintains the structure of the Content By Query Web Part. Stores data retrieved when querying content in the path /dsQueryResponse/Rows/Row. MSDN Definition In short…. @bniaulin Share-gate.com
  • 19. ContentQueryMain.xsl Think of it as the big container of the WebPart In charge of what isn’t repeated (header, footer, calling CSS or JS to be used in your itemstyle after) It controls the flow of the content it receives Let’s check it out @bniaulin Share-gate.com
  • 20. Header.xsl Contains templates that define how to display a header and ensure the consistency of group headers. Templates specified in Header.xsl receive the next item row to process, usually the first row in a group unless there are multiple columns. If there are multiple columns, the templates receive the first row of the column. You can retrieve data about the next item row by using the @Property directive. You can use the $Group parameter that contains the groupby column name and the $GroupType that represents the column type of the groupby column. MSDN Definition In short…. @bniaulin Share-gate.com
  • 21. Header.xsl When you use the CQWP with a GroupBy option the header.xsl is called. @bniaulin Share-gate.com
  • 22. Itemstyle.xsl Contains templates that define how to display an item. These templates receive and process one row of data at a time, ensuring that the style and data in the item rows is consistent. You can retrieve data about a row by using the @Property directive. Basically it’s what gets applied to each “item” or row. <div class="right"> <span class="title"><xsl:value-of select="@Title" /></span> <span class="location">Location: <xsl:value-of select="@Location" /></span> @bniaulin Share-gate.com
  • 23. Examples @bniaulin Share-gate.com
  • 24. DEMO
  • 26. Dynamic Filters PageFieldValue Specify a field on the Page Layout to act as the filter for the Query PageQueryString Takes the value in the URL and applies it as the filter for the Query @bniaulin Share-gate.com
  • 27. Example on MSDN BLog Ref: MSDN Blog @bniaulin Share-gate.com
  • 30. Access the Advanced Properties You can easily access advanced properties of the CQWP Edit Web Part Export into .webpart file Open with an XML editor (notepad, etc.) Modify the file Import .webpart back into your site @bniaulin Share-gate.com
  • 31. More Advanced Stuff CommonViewFields Ask for additional fields By default the CQWP does not return all fields automatically QueryOverride When used, all settings for Query in the UI are greyed out Makes it possible to specify the query portion of a cross-list query in CAML. @bniaulin Share-gate.com
  • 32. Still More Advanced Properties… WebsOverride Determines whether the cross-list query should recurse subsites. ListsOverride Specify which lists/library you want to query <property name="ListsOverride" type="string"><![CDATA[<Lists><List ID="31A7C09D-52CC- 4585-B998-A3F180A9BD07"/><List ID="7382D66D-2E4C-47CB-A95C- 5EECD68F5E61"/></Lists> ]]></property> @bniaulin Share-gate.com
  • 33. DEMO Filter by File Extension
  • 34. Q&A
  • 35. THANK YOU! KEEP IN TOUCH ON TWITTER @BNIAULIN Benjamin Niaulin @bniaulin Share-gate.com