Content Query Web Part is one of the most frequently used Web Parts available out of the box with SharePoint Server 2010. Thanks to its flexibility, great performance and rich configuration possibilities it’s a great solution for aggregating content. Because the presentation layer of the CQWP is based on XSLT, the possibilities are virtually unlimited, but as soon as you start using custom XSLT stylesheets some strange things start to happen.
Many customers who use SharePoint Server 2010 for their Internet-facing website, ask for a mechanism that would allow them to use short URLs like http://www.awt.com/edinburgh instead of http://www.awt.com/destinationguides/uk/scotland/edinburgh/. SharePoint 2010 doesn’t have such mechanism out of the box and if you know SharePoint at least a little, you know that there is always more than one way to get something done. So what are the possibilities and which one of them is the best to use?
SharePoint 2010 ships with the SPSecurityTrimmedControl that allows you to conditionally display content to users based on their permissions. On top of that it gives you the ability to display content to anonymous/authenticated users only which unfortunately doesn’t work. And although you might want start off and develop something of your own, it turns out that for all this time there was a solution for this just around the corner.
One of the great capabilities of SharePoint Server is the ability of including reusable content: standard snippets of HTML which you can use in different places over and over again without having to copy & paste it. The great thing about Reusable Content is that you have the option to insert a reference instead of the copy of the content so that if the content snippet ever changes, you won’t have to manually check every single page in your site to ensure that the content is correct: SharePoint will do this for you automatically. While this piece of functionality is really great you wouldn’t believe how inconvenient it is to get to this list to add new content snippets in there.
While working on Microsoft Office SharePoint Server (MOSS) 2007 Web Content Management (WCM) Solutions you might have relied on the fact that the name of the Pages Library was always Pages. Well almost always, because in some languages, like German, it was translated along with the Title. Given that fact, changed the way we had to deal with the Pages Library in code. Instead of hard coding the URL part of the Pages Library, all of a sudden we had to retrieve it dynamically, just because someone accidentally translated the URL of the Pages Library. But looking at SharePoint Server 2010 tells us otherwise. Now the URL parts of Pages Libraries in all languages are translated. So was it a mistake in MOSS 2007 that in German the Pages Library was called Seiten or was it a mistake that the Dutch one was called Pages instead of Paginas?