Howdy, my name is Dustin Anglin and Im a Program Manager on the Enterprise Content Management team. Today Im here to talk about the new things were doing with one of most popular SharePoint web parts, the Content Query Web Part, or as its better known amongst acronym-o-holics, the CQWP. If you havent already checked it out, be sure to check out both the ECM overview by Jim Masson and the WCM overview by Sangya Singh.
The CQWP is designed to return roll-up content over several different scopes, anywhere from a single a list or library, to all lists or libraries across an entire Site Collection. In SharePoint 2010, the CQWP single list query is also optimized to work over large single libraries, taking advantage of smart indices and other tools designed to improve query performance over large document libraries. For a more in-depth overview of the CQWP, Id recommend checking out the SharePoint 2007 blog post by George Perantatos.
I mentioned that we want our web part to be driven by the context of the current article, specifically the current articles News Category. In SharePoint 2010, we can accomplish this by setting up our query filters with two nifty new tokens:
PageFieldValue
This token lets you specify a field that is on the current page layout and dynamically replaces the value for the filter with the current pages field value. For Example: Ive created a custom Managed Metadata field News Category which specifies what kind of story my News Category is (Business, Politics, World, Sports, etc) and added it to the News Article page layout. By using the PageFieldValue token, the query will change based on the current pages News Category. So if the current pages category is Sports it will return pages tagged with Sports.
PageQueryString
Just like the PageFieldValue token, you can also choose to look at the URL query string for a value to use in the Query. For Example: You could add a Query String value to the URL like &NewsCategory=Sports and set the CQWPs query to return pages where the News Category field was equal to Sports or whatever value was currently in the Query String. Using the query string parameter is better when you want to show different sets of results in a web part without having to make a new page for each different results set.
For this example, we will use the PageFieldValue token to setup our CQWP to return news articles whose News Category field contains the same metadata value in the current articles News Category field. And by modifying the custom News Article page layout, the CQWP will automatically appear on all new News Article pages, already set up and ready to display related news articles. Looking a bit closer at the query, you can see that Ive added two other filters. The first one filters out any article with the same name as the current article (essentially making sure the current article isnt duplicated in the query results), and a filter that only returns news stories created in the past 7 days, making sure the results are always fresh. Also, in this instance, the News Category metadata field is one of the new Managed Metadata fields, which the CQWP fully supports, including the single & multi-value varieties. While not shown in this example, the CQWP also supports filtering over the Enterprise Keywords columns & the All Tags column which lets you look for any managed metadata tag on a queried item, regardless of which metadata field on the item contains the tag.
Going to the Presentation section of the tool pane, there is a new section called Fields to display which lets you type in the fields you want to display for any defined XSL style. So think of the Item Style as a blank template, defining how many things can be displayed and where they go, but not which fields get displayed. Once youve selected your template, you just need to
plug in the fields that you want to display by typing them into the slots that show up for the given item style. I chose to use a style that had an image on the left, a link to the page that was represented by the articles title, and a brief excerpt of the article (a Custom Field I defined for my page layout). By typing in the fields I want to display in each of those slots, I get the following results:
Wrapping it up
So to recap things, heres what we accomplished:
Added a CQWP Web Part to all my news story pages by modifying the page layout in one place Configured the Web Part query to be driven dynamically based on the current pages context (sports articles return related sports articles, business articles return other business articles, etc) Configured the presentation of the web part to show custom fields without writing custom XSLT.
Now when my content authors write news stories, every article will have a web part showing the most recent related articles, and my content authors dont have to mess around with web parts and queries.
In Summary
This is just one example of some of the cool new things you can do with the Content Query Web Part by leveraging power of context driven queries, and the easy-to-use, code-less way to configure how you display your content. Check back often for more info on the CQWP and other exciting new ECM features in the SharePoint 2010. Posted Friday, May 14, 2010 11:30 PM by ecmblog | 0 Comments Filed under: Web Content Management, Content Query Web Part, WCM, CQWP, Configuration
nochange
Im Josh Stickler, the Program Manager responsible for Variations. In this post, I will explain:
Where to find the View Changes button When the View Changes button is available Our envisioned content editing process using View Changes
The most common application of the Variations feature is in multi-language sites. Let's look at View Changes from the perspective of Anders, an English-to-Danish translator working with the Danish subsidiary of AdventureWorks, an international camping goods retailer.
AdventureWorks is set up with an English (EN-US) site as its source label and target labels for international markets, each corresponding to a different language. Pages from the source label automatically propagate to the target labels when they are published so AdventureWorks' global web presence is in sync. Translators at each of the targets then process the English-language content for localized consumption. AdventureWorks Variations hierarchy looks like this:
Initial Localization
Automatic Creation
Let's imagine that content authors at AdventureWorks in the United States have just published a new page with a sneak peek of this winter's new product lineup. Since Automatic Creation is enabled (this is the case by default), the page is picked up by the Variations Propagate Pages timer job and copied to all target labels, including Danish (DA-DK).
E-mail Notification
As the designated owner of the new page, Anders gets an e-mail informing him that this page has been copied to the target label by the Variations feature and is ready for processing.
Subsequent Modification
Source Modification and Publication
Back in the United States, AdventureWorks decides to announce a new product in its sneak peek lineup. English language content authors add a paragraph describing this new product, an ultra light sleeping bag, and publish the page. The page now propagates to the Danish variation.
E-mail Notification
Anders receives an e-mail notification that new content is ready for processing. He visits the appropriate page on the Danish variation site and the English content appears and is waiting for translation. But wait, there is a lot of English content here, and Anders has already translated most of it. Only one paragraph has been added. How will Anders know that he doesnt need to re-translate the whole page? Its at this point that the View Changes button comes to the rescue and is available.
Please note that View Changes requires the Variations Propagate Pages timer job to be enabled. View Changes only compares changes between a source version of a page and a target version that has been copied using the Variations Propagate Pages operation.
Version Comparison
Anders clicks the button and a version differential window pops up, highlighting the new paragraph that has been added. Now, Anders knows that only this paragraph has been added and doesn't have to scan through the new and old versions of the English content to determine what he has to translate.
SharePoint 2010 provides the ability to disable automatic page propagation; source variation site content authors can then use the Update Variations button to propagate content on demand. See my previous post, Site and Page Propagation for more information on how to enable this setting. Thanks for reading! Keep checking back for new blog posts. Regards Josh Stickler Program Manager Posted Wednesday, May 05, 2010 9:00 AM by ecmblog | 0 Comments Filed under: Web Content Management, Content Deployment, Content Management, WCM, Variations
nochange
Figure 1: Example of a Trend Report showing Number of Page Views for each day for a default period of 30 days.
Figure 2: Example of a Rank Report showing the Top Pages sorted on the Number of Page Views for a default period of 30 days.
What follows is an overview of each type of the report and the associated metrics. Also, summarized are the kind of reports available for each level of aggregation i.e. Site, Site Collection and Web Application and Search Service Application.
Traffic Reports
The traffic reports capture the user behavior information related to total clicks, frequent users, popular pages, and information about navigation to and from the current SharePoint component.
Trend Reports
1. Number of Page Views: Total number of page views each day. 2. Number of Daily Unique Visitors: Total number of unique visitors each day. SharePoint authenticated users and anonymous users (using IP address) are counted as visitors.
3. Number of Referrers: Total number of unique URLs external to the current entity (parent entity is treated as external as well), from where the users navigated to the current entity.
Rank Reports
1. Top Pages: Most viewed pages in the current entity. 2. Top Visitors: Most frequent visitors of the current entity. 3. Top Referrers: Top URLs external to the current entity from where users navigated to the current entity. 4. Top Destinations: Similar to Referrers, these are the top external URLs that the user visited from the current entity. 5. Top Browsers: Top browsers being used to visit the current entity. Report Scope Number of Page Views Number of Unique Visitors Number of Referrers Top Pages Top Visitors Top Referrers Top Destinations Top Browsers Table 1: Summary of the traffic reports availability at different SharePoint hierarchy levels Note: Traffic Reports do not apply at Search Service Application level. Site Site Collection Web Application
Search Reports
The search reports capture the user behavior information related to the queries on the site.
Trend Reports
1. Number of Queries: Total number of queries each day.
Rank Reports
1. Top Queries: Most issued queries per day. 2. Failed Queries: Most issued queries for which either there were no results or the user did not click on any results. 3. No Result Queries: Most issued queries for which no results were returned.
Other Reports
1. Best Bet Suggestion Report: Recommends URLs as most likely results for particular search queries based on analysis of usage patterns. The site administrators can accept or reject these suggestions. If they accept, the corresponding query-URL pair is added to the search keywords list. 2. Best Bet Usage: Shows how Best Bet suggestions are doing over time. For every Best Bet query issued, the report shows the percentage of clicks on the Best Bet URL compared to other URLs. 3. Best Bet Action History Report: Tracks the actions performed by the site administrator on the Best Bet Suggestion Report. Report Scope Number of Queries Top Queries Failed Queries No Result Queries Best Bet Usage Best Bet Suggestions Best Bet Suggestion Action History Table 2: Summary of the search reports availability at different SharePoint component hierarchy levels Note: The search reports do not apply at Site Level. Site Collection Web Application Search Service Application
Inventory Reports
The inventory reports are targeted to help the site administrators in managing the site by keeping track of the site structure and storage and version issues.
Trend Reports
1. Number of Site Collections: Total number of site collections for each Web Service Application for each day. 2. Storage Usage: Total storage used in Megabyte (MB) for a site collection and the Maximum Storage Allowed in MB for each day. 3. Number of Sites: Total number of sites within each Site Collection for each day.
Rank Reports
1. Top Site Product Versions: The Site Product Version sorted in the order of Number of Sites or Percentage of Overall sites using the corresponding version for this site collection. 2. Top Site Languages: The Site Product Language sorted in the order of Number of Sites or Percentage of Overall sites using that language for this site collection. Report Scope Number of Site Collections Storage Usage Number of Sites Top Site Product Versions Top Site Languages Table 3: Summary of Inventory Reports availability at different SharePoint component hierarchy levels Note: Traffic Reports do not apply at Search Service Application level. Site Site Collection Web Application