<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Waldek Mastykarz</title>
	
	<link>http://blog.mastykarz.nl</link>
	<description>Innovation Matters | SharePoint Server MVP | ISSN 2210-9390</description>
	<lastBuildDate>Mon, 06 Sep 2010 18:15:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/WaldekMastykarz" /><feedburner:info uri="waldekmastykarz" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Inconvenient SharePoint 2010 Incoming Links</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/DeWXRUfudzk/</link>
		<comments>http://blog.mastykarz.nl/inconvenient-sharepoint-2010-incoming-links/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 18:11:20 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[WCM]]></category>
		<category><![CDATA[Inconvenient SharePoint]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/inconvenient-sharepoint-2010-incoming-links/</guid>
		<description><![CDATA[Managing links on a website can be really challenging. There can be numerous pages linking to each other, and if new content is being added on regular it’s just the matter of time when things go wrong and broken links start appearing in your content. A good Content Management System (CMS) provides you with a [...]]]></description>
			<content:encoded><![CDATA[<p><img class="intro-banner" alt="Incoming Links button on the SharePoint 2010 Ribbon" src="http://mastykarz.nl/blog/images/0a93e238571d_10AA8/banner_thumb.png" width="471" height="110" />    <br />Managing links on a website can be really challenging. There can be numerous pages linking to each other, and if new content is being added on regular it’s just the matter of time when things go wrong and broken links start appearing in your content. A good Content Management System (CMS) provides you with a mechanism for tracking both incoming and outgoing links and SharePoint 2010 is no exception here. Using the <em>Incoming Links </em>report it allows you to track links within the Site Collection. However there is one thing you have to keep in mind while working with the SharePoint 2010 <em>Incoming Links</em> report.</p>
<h2>What’s wrong with SharePoint 2010 Incoming Links?</h2>
<p>To help you manage links on your website, SharePoint 2010 ships with the <em>Incoming Links</em> functionality. According to its description it should allow you to view the list of pages linking to the current page. Using the <em>Incoming Links</em> report is very intuitive: you go to the Publishing Page for which you want to see the incoming links and click the <em>Incoming Links</em> button on the Ribbon. While it all sounds so simple, it really isn’t. Let me show you why.</p>
<p>In the following scenario I have a Press Release called <em>PressRelease_0001.aspx</em> in the <em>Press Releases </em>sub site and another page called <em>Lorem-ipsum.aspx</em> located under the root web. The Lorem ipsum page has a link to the press release.</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Lorem ipsum page with a link pointing to the Press Release 0001" src="http://mastykarz.nl/blog/images/0a93e238571d_10AA8/01.png" width="456" height="440" /></p>
<p>So according to the description of the <em>Incoming Links</em> report, I should see the <em>Lorem ipsum</em> page in the list of incoming links. Unfortunately if you navigate to the list of <em>Incoming Links</em> for the <em>PressRelease_0001.aspx</em> page, you will see an empty list.</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Empty list of incoming links" src="http://mastykarz.nl/blog/images/0a93e238571d_10AA8/02.png" width="480" height="421" /></p>
<p>What the description doesn’t tell you is, that the standard <em>Incoming Links</em> report provided with SharePoint 2010 works only for links that come from the same site. If I create a link to the <em>PressRelease_0001.aspx</em> page from <em>PressRelease_0002.aspx</em> it will appear on the list of incoming links as expected.</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Incoming link from Press Release 0002 on the list of incoming links" src="http://mastykarz.nl/blog/images/0a93e238571d_10AA8/03.png" width="480" height="422" /></p>
<p>As you can imagine, such report is pretty useless in probably every real-life WCM scenario. Luckily, just because it isn’t there out of the box, doesn’t mean it cannot be done. SharePoint 2010 is a highly extensible framework for delivering Web Content Management solutions and this is just one of many examples how you can use the extensibility capabilities of the SharePoint 2010 framework to make the CMS work for you.</p>
<h2>Better Incoming Links report with <a href="http://mavention.nl">Mavention</a> Incoming Links</h2>
<p><em>Mavention Incoming Links</em> is a simple SharePoint 2010 Solution that solves the issue of the <em>Incoming Links</em> report displaying only local links. After installation the <em>Mavention Incoming Links </em>Site Collection Feature appears in your site. After you activate it you won’t see any changes in the User Interface: <em>Mavention Incoming Links </em>replaces the standard SharePoint 2010 <em>Incoming Links</em> report with one that displays incoming links from other sites as well.</p>
<p><a href="http://mastykarz.nl/blog/images/0a93e238571d_10AA8/04.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Both incoming links for the Press Release 0001 page displayed correctly by the Mavention Incoming Links report" src="http://mastykarz.nl/blog/images/0a93e238571d_10AA8/04_thumb.png" width="480" height="344" /></a></p>
<h2>Summary</h2>
<p>SharePoint 2010 ships with a report that allows you to view Incoming Links for Publishing Pages. The shortcoming of that overview is that it shows only links coming from the same site where the given page is. <em>Mavention Incoming Links</em> solves that issue by overriding the report and including all incoming links. By replacing the standard report it full integrates with the existing experience and allows content editors to use the new report without any learning curve.</p>
<p>Download: <a href="http://blog.mastykarz.nl/go/d-mavention_incominglinks/">Mavention Incoming Links</a> (8KB, WSP)</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:05270f32-c071-4fb3-95c5-9991a8bff4e5" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/WCM" rel="tag">WCM</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=DeWXRUfudzk:P3ob3ilEspI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=DeWXRUfudzk:P3ob3ilEspI:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=DeWXRUfudzk:P3ob3ilEspI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=DeWXRUfudzk:P3ob3ilEspI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=DeWXRUfudzk:P3ob3ilEspI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=DeWXRUfudzk:P3ob3ilEspI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=DeWXRUfudzk:P3ob3ilEspI:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/DeWXRUfudzk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/inconvenient-sharepoint-2010-incoming-links/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/inconvenient-sharepoint-2010-incoming-links/</feedburner:origLink></item>
		<item>
		<title>Microsoft Silverlight 4 and SharePoint 2010 Integration (book review)</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/1GC9BifLnJ0/</link>
		<comments>http://blog.mastykarz.nl/microsoft-silverlight-4-sharepoint-2010-integration-book-review/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 08:54:28 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/microsoft-silverlight-4-sharepoint-2010-integration-book-review/</guid>
		<description><![CDATA[SharePoint 2010 ships with native support for Silverlight what makes creating Rich Internet Applications (RIA) easier and faster. And although Silverlight has been around for a couple of years now, there is more to developing Silverlight RIAs on SharePoint 2010. While you could use the classic – web-services-based approach, SharePoint 2010 ships with the Silverlight [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mastykarz.nl/blog/images/1002c7218c67_8FEA/0066_Cover.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 10px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Microsoft Silverlight 4 and SharePoint 2010 Integration book cover" align="left" src="http://mastykarz.nl/blog/images/1002c7218c67_8FEA/0066_Cover_thumb.jpg" width="228" height="305" /></a>SharePoint 2010 ships with native support for Silverlight what makes creating Rich Internet Applications (RIA) easier and faster. And although Silverlight has been around for a couple of years now, there is more to developing Silverlight RIAs on SharePoint 2010. While you could use the classic – web-services-based approach, SharePoint 2010 ships with the Silverlight Object Model which makes it easy to work with data from SharePoint in Silverlight applications.</p>
<p>The <em>Microsoft Silverlight 4 and SharePoint 2010 Integration</em> book covers the basics of developing Silverlight applications on the SharePoint 2010 platform. The book begins with a global overview of what Silverlight is and what integration capabilities provided with SharePoint 2010 are: all of this supported with some easy to follow samples. Through the next chapters the book discusses the integration capabilities in more detail and focuses on different pieces such as the Silverlight Object Model, Business Connectivity Services (BCS) and the SharePoint Data Services.</p>
<p>Although the book targets developers who have previous SharePoint experience it provides in-depth explanation of new capabilities of SharePoint 2010, so if you haven’t done that much with the newest version of SharePoint, you won’t feel lost. The detailed explanation of different pieces of the sample solutions makes it easy to learn from the examples and the clear chapter structure makes it possible to skip the pieces that you are already familiar with.</p>
<p>Because the book doesn’t cover the basics of SharePoint and Silverlight development, it isn’t really suited for beginner developers. Having understanding of how development on both platforms looks like is required before you start reading this book. On the other hand the <em>Microsoft Silverlight 4 and SharePoint Integration</em> book doesn’t cover more advanced topics such as decoupling the data layer from the UI or discussing different deployment capabilities for Silverlight applications in SharePoint 2010 and when to use which, what doesn’t make it a book for advanced developers. In fact it’s a book that provides an intermediate-level overview of how you could leverage Silverlight 4 to create RIAs on the SharePoint 2010 platform.</p>
<p><em>Microsoft Silverlight 4 and SharePoint 2010 Integration</em> is an interesting and easy to read book that explains the new capabilities of SharePoint 2010 for creating Rich Internet Applications using Silverlight 4. It provides good overview of both SharePoint 2010 and Silverlight 4 and is a good starting point for exploring more advanced RIA topics. If you are interested in leveraging Silverlight for creating rich applications on the SharePoint 2010 platform but you haven’t done that much with Silverlight yet, it’s a book you should read.</p>
<p>Check out <em><a href="http://www.packtpub.com/microsoft-silverlight-4-and-sharepoint-2010-integration/book?utm_source=blog.mastykarz.nl&amp;utm_medium=bookrev&amp;utm_content=blog&amp;utm_campaign=mdb_004245">Microsoft Silverlight 4 and SharePoint 2010 Integration</a></em> at <a href="https://www.packtpub.com/">Packt Publishing</a>.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b353f214-720c-4c12-8df0-22f310487f91" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/Silverlight" rel="tag">Silverlight</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=1GC9BifLnJ0:AbPt65BlqUs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=1GC9BifLnJ0:AbPt65BlqUs:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=1GC9BifLnJ0:AbPt65BlqUs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=1GC9BifLnJ0:AbPt65BlqUs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=1GC9BifLnJ0:AbPt65BlqUs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=1GC9BifLnJ0:AbPt65BlqUs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=1GC9BifLnJ0:AbPt65BlqUs:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/1GC9BifLnJ0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/microsoft-silverlight-4-sharepoint-2010-integration-book-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/microsoft-silverlight-4-sharepoint-2010-integration-book-review/</feedburner:origLink></item>
		<item>
		<title>Ask the Expert @ SharePoint Connections 2010 Autumn</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/QsHqtNHHnC4/</link>
		<comments>http://blog.mastykarz.nl/ask-the-expert-sharepoint-connections-2010-autumn/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 07:54:16 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/ask-the-expert-sharepoint-connections-2010-autumn/</guid>
		<description><![CDATA[Who would’ve thought: two SharePoint conferences in the Netherlands in one year! Proudly presenting: Microsoft SharePoint Connections 2010 Autumn. Earlier this year there was the SharePoint Connections 2010 conference that was the unofficial launch of Microsoft SharePoint 2010 in Europe and based on the great feedback that Microsoft and Penton Media got, they decided to [...]]]></description>
			<content:encoded><![CDATA[<p>Who would’ve thought: two SharePoint conferences in the Netherlands in one year! Proudly presenting: <a href="http://www.devconnections.com/speurope/">Microsoft SharePoint Connections 2010 Autumn</a>.</p>
<p>Earlier this year there was the SharePoint Connections 2010 conference that was the unofficial launch of Microsoft SharePoint 2010 in Europe and based on the great feedback that Microsoft and Penton Media got, they decided to organize a second SharePoint conference here in the Netherlands.</p>
<p>SharePoint 2010 has been on the market for a few months now and there is some great content that will be presented on the conference based on the real-life experience of the speakers. No matter if you are developer, IT-Pro or a customer who is just interested in SharePoint 2010, you will find some great content on the SharePoint Connections 2010 Autumn. Microsoft and Penton Media lined up for you some of the best speakers in the SharePoint community, like Andrew Connell, Richard Taylor, Spencer Harbar, Mirjam van Olst and Wouter van Vugt just to name a few.</p>
<p>Additionally, once again I have the honor of being at the Ask the Expert booth. Together with my colleague here at Mavention Robert Jaakke who is one of the few Microsoft Certified Masters (MCM) for SharePoint 2007 we will be there to answer all of your questions about the SharePoint platform, so don’t forget to drop by and say hi.</p>
<p>If you haven’t registered yet, go ahead and <a href="http://www.devconnections.com/shows/NED2010FALL/registration.asp?s=157">sign up for the SharePoint Connections 2010 Autumn, The Hague on 28 &amp; 29 September</a>. The agenda looks really impressive and I’m sure it’s going to be a great conference with a lot of great people from the SharePoint community. See you there!</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:94f6a2d8-25ce-42cd-b841-e3b758e9512b" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=QsHqtNHHnC4:BV6PsG7zsZQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=QsHqtNHHnC4:BV6PsG7zsZQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=QsHqtNHHnC4:BV6PsG7zsZQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=QsHqtNHHnC4:BV6PsG7zsZQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=QsHqtNHHnC4:BV6PsG7zsZQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=QsHqtNHHnC4:BV6PsG7zsZQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=QsHqtNHHnC4:BV6PsG7zsZQ:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/QsHqtNHHnC4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/ask-the-expert-sharepoint-connections-2010-autumn/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/ask-the-expert-sharepoint-connections-2010-autumn/</feedburner:origLink></item>
		<item>
		<title>Easy editing meta tags for Publishing Pages with Mavention Meta Fields</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/TmBEfCNa12g/</link>
		<comments>http://blog.mastykarz.nl/easy-editing-meta-tags-publishing-pages-mavention-meta-fields/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 19:21:16 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[WCM]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/easy-editing-meta-tags-publishing-pages-mavention-meta-fields/</guid>
		<description><![CDATA[Including meta tags for pages on Internet-facing websites is very important. Additional information included in meta tags makes it easier for search engines to find and classify the content. Still many websites either don’t use meta tags at all or don’t provide content editors with a simple mechanism for managing the meta tags making managing [...]]]></description>
			<content:encoded><![CDATA[<p>Including meta tags for pages on Internet-facing websites is very important. Additional information included in meta tags makes it easier for search engines to find and classify the content. Still many websites either don’t use meta tags at all or don’t provide content editors with a simple mechanism for managing the meta tags making managing the meta tags a one-time process. In many situations meta tags are not even a part of the information architecture for Internet-facing websites and are easily being forgotten in the development process. Additionally, as they are not being displayed on the screen, they are not a part of the branding what makes it challenging for the developers to provide an intuitive editing interface for. <em>Mavention Meta Fields</em> is a turn-key solution that allows you to easily add support for managing page-level meta tags even if your website is almost ready to go on-line.</p>
<h2>What is Mavention Meta Fields?</h2>
<p><em>Mavention Meta Fields</em> is a SharePoint solution that allows you to easily add meta tags to Publishing Pages. If you haven’t included meta tags initially as a part of your information architecture or you’re looking for an easy way to add meta tags to Publishing Pages, <em>Mavention Meta Fields</em> is the right solution for you.</p>
<h2>Configuring Mavention Meta Fields</h2>
<p>Upon deployment <a href="http://mavention.nl"><em>Mavention</em></a><em> Meta Fields</em> install a Site Collection Feature called <em>Mavention Meta Fields</em>. All you have to do to use <em>Mavention Meta Fields</em> is to activate this single Feature. That’s it. You don’t have to do any changes to your Master Pages or Page Layouts to use <em>Mavention Meta Fields</em>.</p>
<p><a href="http://mastykarz.nl/blog/images/EasyeditingofmetatagsforPublishingPagesw_E3C8/01.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="The Mavention Meta Fields Site Collection Feature available after deploying the Mavention Meta Fields Solution" src="http://mastykarz.nl/blog/images/EasyeditingofmetatagsforPublishingPagesw_E3C8/01_thumb.png" width="480" height="81" /></a></p>
<p>In order to use <em>Mavention Meta Fields </em>with your existing Publishing Pages you have to add new columns to your existing Content Types. Those columns will store the contents of meta tags for Publishing Pages. There are two things that you have to consider while adding those columns. First of all the <strong>display name</strong> of the field determines the name of the meta tag that will be included in your page. Secondly, in order for the field to be picked up by <em>Mavention Meta Fields</em> as a meta tag field, it has to be added to the <em>Publishing Meta Tags</em> group. In my example I’ve added two Site Columns called <em>description</em> and <em>keywords</em>.</p>
<p style="margin-right: 0px" dir="ltr"><a href="http://mastykarz.nl/blog/images/EasyeditingofmetatagsforPublishingPagesw_E3C8/02.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="description and keywords Site Columns in the Publishing Meta Tags group" src="http://mastykarz.nl/blog/images/EasyeditingofmetatagsforPublishingPagesw_E3C8/02_thumb.png" width="480" height="347" /></a></p>
<p>Once the columns are in place you have to add them to the Content Types. In this example I’ve added them to the out of the box available <em>Welcome Page </em>Content Type.</p>
<p><a href="http://mastykarz.nl/blog/images/EasyeditingofmetatagsforPublishingPagesw_E3C8/03.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="description and keywords Site Columns added to the Welcome Page Content Type" src="http://mastykarz.nl/blog/images/EasyeditingofmetatagsforPublishingPagesw_E3C8/03_thumb.png" width="480" height="347" /></a></p>
<p>And that’s all. You can start using <em>Mavention Meta Fields</em> now.</p>
<h2>Editing meta tags with Mavention Meta Fields</h2>
<p>When you navigate to a Publishing Page you won’t see much difference. But as soon as you edit the page, the meta tags editor will appear on the right side of the page right under the Status Bar:</p>
<p><a href="http://mastykarz.nl/blog/images/EasyeditingofmetatagsforPublishingPagesw_E3C8/04.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Meta tags editor under the SharePoint Status Bar" src="http://mastykarz.nl/blog/images/EasyeditingofmetatagsforPublishingPagesw_E3C8/04_thumb.png" width="480" height="318" /></a></p>
<p>After you click the <em>show page metadata</em> link, the edit panel will slide down and you will be able to edit the values for your meta tags:</p>
<p><a href="http://mastykarz.nl/blog/images/EasyeditingofmetatagsforPublishingPagesw_E3C8/05.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Editing meta tags values using the Mavention Meta Fields solution" src="http://mastykarz.nl/blog/images/EasyeditingofmetatagsforPublishingPagesw_E3C8/05_thumb.png" width="480" height="318" /></a></p>
<p>Once you’re done, save the changes. The meta tags editor will disappear again, but if you view the HTML source of the page you will notice two meta tags added with the values that you have just added using the meta tags editor:</p>
<p><a href="http://mastykarz.nl/blog/images/EasyeditingofmetatagsforPublishingPagesw_E3C8/06.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="description and keywords meta tags added by the Mavention Meta Fields control" src="http://mastykarz.nl/blog/images/EasyeditingofmetatagsforPublishingPagesw_E3C8/06_thumb.png" width="480" height="318" /></a></p>
<h2>Summary</h2>
<p><em>Mavention Meta Fields </em>is a great solution for managing meta tags for Publishing Pages. Because it doesn’t require you to do any changes to your Master Pages and Page Layouts it’s a great solution for adding meta data to your Publishing Pages even if you haven’t taken it into account while designing the website and its intuitive interface makes it really easy for the content editors to manage the meta tags. Depending on your requirements you might need to include some additional information in the meta tags. Using the <em>Mavention Meta Fields</em> solution you can easily add additional fields by including them in the <em>Publishing Meta Tags</em> groups.</p>
<p>Download: <a href="/go/d-mavention_metafields/">Mavention Meta Fields</a> (31,8KB, WSP)</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:17cd6eef-a2f8-4053-8a4e-b26bd485fa10" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/SharePoint+Server+2010" rel="tag">SharePoint Server 2010</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TmBEfCNa12g:8cFUjHEuvzs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TmBEfCNa12g:8cFUjHEuvzs:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TmBEfCNa12g:8cFUjHEuvzs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=TmBEfCNa12g:8cFUjHEuvzs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TmBEfCNa12g:8cFUjHEuvzs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TmBEfCNa12g:8cFUjHEuvzs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=TmBEfCNa12g:8cFUjHEuvzs:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/TmBEfCNa12g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/easy-editing-meta-tags-publishing-pages-mavention-meta-fields/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/easy-editing-meta-tags-publishing-pages-mavention-meta-fields/</feedburner:origLink></item>
		<item>
		<title>Simple SharePoint 2010 Replaceable Parameters with Mavention Replaceable Parameters Snippets</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/Sr9hB4r68mk/</link>
		<comments>http://blog.mastykarz.nl/simple-sharepoint-2010-replaceable-parameters-mavention-replaceable-parameters-snippets/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 12:50:51 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/simple-sharepoint-2010-replaceable-parameters-mavention-replaceable-parameters-snippets/</guid>
		<description><![CDATA[The new Visual Studio 2010 SharePoint Developer Tools ship with Replaceable Parameters which allow you to provide values for SharePoint solution items whose actual values are not known at the design time. And while the Replaceable Parameters are without a doubt a great improvement in the development process, there is one problem with them: there [...]]]></description>
			<content:encoded><![CDATA[<p>The new Visual Studio 2010 SharePoint Developer Tools ship with <a href="http://msdn.microsoft.com/en-us/library/ee231545.aspx">Replaceable Parameters</a> which allow you to provide values for SharePoint solution items whose actual values are not known at the design time. And while the Replaceable Parameters are without a doubt a great improvement in the development process, there is one problem with them: there are quite a few of them and looking up the right one might get you out of element when developing. And this is exactly where <a href="http://mavention.nl">Mavention</a> Replaceable Parameters Snippets come in.</p>
<p>Mavention Replaceable Parameters Snippets is a collection of Visual Studio Code Snippets that contain every Replaceable Parameter available out of the box. After the installation they allow you to quickly choose the right token from a list:</p>
<p><a href="http://mastykarz.nl/blog/images/SimpleSharePoint2010ReplaceableParameter_A1A9/01.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Inserting a Replaceable Parameter using Mavention Replaceable Parameters Snippets" src="http://mastykarz.nl/blog/images/SimpleSharePoint2010ReplaceableParameter_A1A9/01_thumb.png" width="480" height="127" /></a></p>
<h2>Before you start</h2>
<p>Before you install the Mavention Replaceable Parameters Snippets you have to create a folder where you will install the snippets. In fact you will need two folders: one for snippets that can be used in all XML files, like Element Manifests and Web Parts and one for HTML snippets that can be used in ASPX pages and User Controls (ASCX).</p>
<p>To create the folders start up Visual Studio 2010, and choose <em>Tools</em> &gt; <em>Code Snippets Manager</em> from the menu:</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Code Snippets Manager menu option highlighted in Visual Studio 2010" src="http://mastykarz.nl/blog/images/SimpleSharePoint2010ReplaceableParameter_A1A9/02.png" width="480" height="330" /></p>
<p>In the <em>Language</em> box choose HTML and click the <em>Add </em>button. In the <em>Select Folder</em> dialog create new folder called <em>HTML</em> and inside it create another folder called <em>SharePoint 2010</em>. Click the <em>Select</em> button: the newly created <em>SharePoint 2010</em> folder should appear in the tree view:</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="SharePoint2010 folder in the list of locations that contain HTML Code Snippets" src="http://mastykarz.nl/blog/images/SimpleSharePoint2010ReplaceableParameter_A1A9/03.png" width="480" height="361" /></p>
<p>Next you have to do the same for the XML snippets:</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="SharePoint 2010 folder in the list of locations that contain XML Code Snippets" src="http://mastykarz.nl/blog/images/SimpleSharePoint2010ReplaceableParameter_A1A9/05.png" width="480" height="361" /></p>
<p>Now you’re ready to install the Mavention Replaceable Parameters Snippets. Double click the .vsi file. On the first page of the wizard click the <em>Next &gt;</em> button.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Visual Studio Content Installer first page of the wizard" src="http://mastykarz.nl/blog/images/SimpleSharePoint2010ReplaceableParameter_A1A9/06.png" width="480" height="432" /></p>
<p>When prompted about no signature, ignore the warning by clicking the <em>Yes</em> button.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="No signature warning while installing the Mavention Replaceable Parameters Snippets" src="http://mastykarz.nl/blog/images/SimpleSharePoint2010ReplaceableParameter_A1A9/07.png" width="396" height="194" /></p>
<p>Next select <strong>all</strong> snippets and then select the <em>SharePoint2010</em> folder in the <em>Location </em>window:</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Selecting the location where the HTML snippets will be installed" src="http://mastykarz.nl/blog/images/SimpleSharePoint2010ReplaceableParameter_A1A9/08.png" width="480" height="432" /></p>
<p>Next do the same for the XML snippets. If you don’t uncheck the <em>My Xml Snippets</em> folder under <em>Microsoft Visual Studio Tools for Applications 2005</em> the Mavention Replaceable Parameters Snippets will be copied to two folders.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Selecting the location where the XML snippets will be installed" src="http://mastykarz.nl/blog/images/SimpleSharePoint2010ReplaceableParameter_A1A9/09.png" width="480" height="432" /></p>
<p>Once you’re ready click the <em>Finish</em> button to start the installation process.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Starting the installation process" src="http://mastykarz.nl/blog/images/SimpleSharePoint2010ReplaceableParameter_A1A9/10.png" width="480" height="432" /></p>
<p>Once finished, close the wizard and start Visual Studio. Open one of your SharePoint projects, open an SPI such as Web Part and try to insert one of the Replaceable Parameters. You can do this by either selecting <em>Edit</em> &gt; <em>IntelliSense</em> &gt; <em>Insert Snippet…</em> from the menu, selecting <em>Insert Snippet…</em> from the context menu or pressing <em>CTRL+K, CTRL+X</em> on the keyboard. In the list of available snippets you should be seeing <em>SharePoint2010</em>:</p>
<p><a href="http://mastykarz.nl/blog/images/SimpleSharePoint2010ReplaceableParameter_A1A9/11.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Inserting Replaceable Parameters using Mavention Replaceable Parameters Snippets in a .webpart file" src="http://mastykarz.nl/blog/images/SimpleSharePoint2010ReplaceableParameter_A1A9/11_thumb.png" width="480" height="135" /></a></p>
<p>And that’s all! With Mavention Replaceable Parameters Snippet you will never have to think twice again about what the exact name of that token was.</p>
<p>Download: <a href="/go/d-mavention_replaceableparameterssnippets">Mavention Replaceable Parameters Snippets</a> (VSI, 19,3KB)</p>
<p><strong>Important</strong>    <br />After downloading the file verify if its extension is .vsi. Depending on your browser it might get changed to .zip. In that case rename the file and change its extension to .vsi to be able to install the Code Snippets automatically.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:627ab6c9-c2ff-4b4e-9c21-acc74186debc" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/Visual+Studio+2010" rel="tag">Visual Studio 2010</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Sr9hB4r68mk:QUo6pI36FyQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Sr9hB4r68mk:QUo6pI36FyQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Sr9hB4r68mk:QUo6pI36FyQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=Sr9hB4r68mk:QUo6pI36FyQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Sr9hB4r68mk:QUo6pI36FyQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Sr9hB4r68mk:QUo6pI36FyQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=Sr9hB4r68mk:QUo6pI36FyQ:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/Sr9hB4r68mk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/simple-sharepoint-2010-replaceable-parameters-mavention-replaceable-parameters-snippets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/simple-sharepoint-2010-replaceable-parameters-mavention-replaceable-parameters-snippets/</feedburner:origLink></item>
		<item>
		<title>Publishing Pages in multiple locations with Mavention Virtual Pages</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/hNpLJvC8XMg/</link>
		<comments>http://blog.mastykarz.nl/publishing-pages-multiple-locations-mavention-virtual-pages/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 11:23:16 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[WCM]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/publishing-pages-multiple-locations-mavention-virtual-pages/</guid>
		<description><![CDATA[Many popular Web Content Management Systems allow you to reuse content across the site. Once published you can then include (fragments of) the page in other places on your website, providing a seamless experience to your visitors. And if you ever need to change something, you can do it in one place and those changes [...]]]></description>
			<content:encoded><![CDATA[<p>Many popular Web Content Management Systems allow you to reuse content across the site. Once published you can then include (fragments of) the page in other places on your website, providing a seamless experience to your visitors. And if you ever need to change something, you can do it in one place and those changes will be automatically pushed to all other locations. Reusing content is probably one of the most desired capabilities in WCM, so it’s pretty surprising that it isn’t available out of the box in SharePoint 2010. While SharePoint 2010 has the concept of Reusable Content it’s meant more for creating small content snippets rather than using it for republishing content on your website. And this is exactly where <em>Mavention Virtual Pages</em> gets useful.</p>
<h2>What is <a href="http://mavention.nl">Mavention</a> Virtual Pages?</h2>
<p>Mavention Virtual Pages is a custom SharePoint 2010 Solution that allows you to publish the content of Publishing Pages in multiple locations on your site.</p>
<p>Upon deployment Mavention Virtual Pages installs a new Site Collection Feature called <em>Mavention Virtual Pages</em>.</p>
<p><a href="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/01sitecolfeature.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Mavention Virtual Pages Site Collection Feature" src="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/01sitecolfeature_thumb.png" width="480" height="94" /></a></p>
<p>Upon activation the <em>Mavention Virtual Pages</em> Feature will install a new Content Type called <em>Virtual Page</em> and will provision a sample Page Layout called <em>Mavention Virtual Page</em>. The idea here is that the Content Type ships with the basic publishing capabilities for Publishing Pages and additional field that allows you to select a Publishing Page that you want to display.</p>
<p><a href="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/02contenttype.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Virtual Page Content Type" src="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/02contenttype_thumb.png" width="480" height="441" /></a></p>
<p>The <em>Mavention Virtual Page</em> Page Layout is a sample Page Layout that you can use for creating your own Page Layouts to support the reuse of pages in your site.</p>
<p><a href="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/03pagelayout.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Contents of the Mavention Virtual Page Page Layout" src="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/03pagelayout_thumb.png" width="480" height="359" /></a></p>
<h2>How Mavention Virtual Pages work</h2>
<p>The working of Mavention Virtual Pages is very simple. When you look at the sample Page Layout you might not notice anything odd: it contains all the regular pieces that every Page Layout in SharePoint has. The only difference is that the sample Page Layout is attached to the Mavention.SharePoint.VirtualPages.VirtualPage class which makes creating virtual pages possible. So if you start creating your own Page Layouts for Virtual Pages this is one thing that you shouldn’t forget otherwise it will not work.</p>
<h2>Using Mavention Virtual Pages: a step-by-step guide</h2>
<p>To better illustrate you the working of Mavention Virtual Pages let’s follow a simple scenario where we will create a Publishing Page in one place on the site and will the publish the same page in a different site. This manual assumes that the Mavention Virtual Pages Solution has already been deployed and that the Mavention Virtual Pages Feature has been activated. In this case we will use the sample <em>Mavention Virtual Page</em> Page Layout shipped with the Mavention Virtual Pages Solution.</p>
<p>First, let’s create a Publishing Page somewhere on the site. For this purpose we will use the Article Left Page Layout available with the standard SharePoint Server 2010 Publishing Site. Also let’s include some sample content that we will reuse later on.</p>
<p><a href="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/04page.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Sample Publishing Page created using the Article Left Page Layout" src="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/04page_thumb.png" width="480" height="267" /></a></p>
<p>The next step is to reuse the page that we have just published. Let’s go to another place in the site and create a new Publishing Page.</p>
<blockquote><p>Before you do this, you might want to ensure that you are allowed to use the Mavention Virtual Page Page Layout in your site. You can do this by navigating to Site Actions &gt; Site Settings &gt; Look and feel &gt; Page layouts and site templates and see if the Mavention Virtual Page is on the list of Allowed Page Layouts.</p>
</blockquote>
<p>After creating the page let’s change the Page Layout to <em>Mavention Virtual Page</em>:</p>
<p><a href="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/05virtualpage.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Changing Page Layout of the newly created Publishing Page to Mavention Virtual Page" src="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/05virtualpage_thumb.png" width="480" height="441" /></a></p>
<p>The next step is to link the Virtual Page to the page that we created earlier. You can do this by specifying the link in the Linked Page field:</p>
<p><a href="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/06link.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Linking the Virtual Page to the Publishing Page created earlier" src="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/06link_thumb.png" width="480" height="441" /></a></p>
<p>The last thing is to publish the Virtual Page. After that you should see the contents of the page that you have linked the Virtual Page to.</p>
<p><a href="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/07virtualpagepublished.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Contents of a Publishing Page republished using the Mavention Virtual Page" src="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/07virtualpagepublished_thumb.png" width="480" height="254" /></a></p>
<p>Notice that the Page Title in the title bar, in the page and in the breadcrumbs contains the title of the Virtual Page, while the content of the page is being retrieved from the linked page.</p>
<p>Now let’s see how <em>Mavention Virtual Pages </em>deal with changes. Let’s go to the original page and change something in its contents.</p>
<p><a href="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/08pagechanged.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Contents of the Publishing Page changed" src="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/08pagechanged_thumb.png" width="480" height="248" /></a></p>
<p>If you navigate to the Virtual Page you should see the refreshed contents of the Publishing Page.</p>
<p><a href="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/09virtualpagechanged.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Virtual Page showing the modified contents of the Publishing Page" src="http://mastykarz.nl/blog/images/MaventionVirtualPages_8F6D/09virtualpagechanged_thumb.png" width="480" height="231" /></a></p>
<h2>Benefits of using Mavention Virtual Pages</h2>
<p>Mavention Virtual Pages is a great solution if you need republishing capabilities in your Web Content Management solution based on the SharePoint Server 2010 platform.</p>
<p>Mavention Virtual Pages works using a simple concept and contains just a few lines of custom code of which all is within the supported public API of SharePoint Server 2010. This makes the Solution robust and reliable. Mavention Virtual Pages use standard controls shipped with SharePoint to render the content so there is no data loss while using Virtual Pages.</p>
<p>Although retrieving the data from linked Publishing Pages happens dynamically, there is no performance penalty when combined with caching and all the content of the Publishing Page linked to a Virtual Page is being retrieved from cache just as it was a part of the Virtual Page itself.</p>
<p>Mavention Virtual Pages is a great Solution if you have a lot of similar pages that you want to publish in multiple locations on your website. As it’s based on Page Layouts it allows you to quickly republish existing pages in other locations. Additionally as it works with anonymous users, it makes a great Solution for your Internet-facing website.</p>
<h2>Future considerations</h2>
<p>This is the first release of Mavention Virtual Pages. While it successfully covers the most common scenario’s there are few things that you should consider before using it in your solution.</p>
<h3></h3>
<h3>Web Parts in content</h3>
<p>SharePoint 2010 allows you to include Web Parts in content. And although from the content editor point of view seems like the Web Parts are a part of content that is being retrieved by Virtual Pages, they actually live outside of the content. While rendering the content, SharePoint replaces markers in text with the Web Parts that physically live in a hidden Web Part Zone. This is why at this moment <em>Mavention Virtual Pages</em> don’t support Web Parts in content.</p>
<h3>Virtual Pages are Page Layout-based</h3>
<p><em>Mavention Virtual Pages</em> are based on Page Layouts to render the contents of linked pages. While it gives you a consistent experience from the development point of view, it might seem limiting from the content editor point of view. To link to multiple types of pages, like press release or event, you need multiple Page Layouts linked to the <em>Virtual Page</em> Content Type. Because a press release will very likely contain different set of information than an event, you will have to create two separate Page Layouts to display the information.</p>
<h3>Usage reporting</h3>
<p>Intensively using Virtual Pages might turn into a nightmare from the content management point of view. While it gives you to great ability of reusing content that is already there in your website, it doesn’t provide you with an overview of which page has been linked to and from where. So when you delete a page published in one page, you might break something in another without even knowing it. Providing an overview of pages that are reused somewhere else in the site is definitely a great idea for a future improvement.</p>
<h3>Deployment</h3>
<p>As you might know by now, the Publishing capabilities of SharePoint Server 2010 are not yet available in the Sandbox. This mean that you need your IT department to get this deployed. Hopefully this is something that we will see changing in the future releases of SharePoint, but at this moment this Solution is available only as a Farm Solution.</p>
<p>Download: <a href="http://blog.mastykarz.nl/go/d-mavention_virtual_pages/">Mavention Virtual Pages</a> (WSP, 7KB)</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:2db866e8-5f54-40e3-8a17-e5c54dac7a71" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/WCM" rel="tag">WCM</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=hNpLJvC8XMg:xGVQIqBD6zc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=hNpLJvC8XMg:xGVQIqBD6zc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=hNpLJvC8XMg:xGVQIqBD6zc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=hNpLJvC8XMg:xGVQIqBD6zc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=hNpLJvC8XMg:xGVQIqBD6zc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=hNpLJvC8XMg:xGVQIqBD6zc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=hNpLJvC8XMg:xGVQIqBD6zc:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/hNpLJvC8XMg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/publishing-pages-multiple-locations-mavention-virtual-pages/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/publishing-pages-multiple-locations-mavention-virtual-pages/</feedburner:origLink></item>
		<item>
		<title>Programmatically provisioning Variations in SharePoint Server 2010</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/Zry7qcq6jNE/</link>
		<comments>http://blog.mastykarz.nl/programmatically-provisioning-variations-in-sharepoint-server-2010/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 08:08:25 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[WCM]]></category>
		<category><![CDATA[Inconvenient SharePoint]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Structured and repeatable deployment]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/programmatically-provisioning-variations-in-sharepoint-server-2010/</guid>
		<description><![CDATA[Last year I wrote an article about programmatically provisioning Variation Hierarchies in SharePoint 2007. The point of that article was that there was really no way you could provision Variations in repeatable way in a supported fashion and had to use reflection to get the job done. The situation in SharePoint 2010 has changed a [...]]]></description>
			<content:encoded><![CDATA[<p>Last year I wrote <a href="/programmatically-creating-variation-hierarchies-sharepoint-2007/">an article about programmatically provisioning Variation Hierarchies in SharePoint 2007</a>. The point of that article was that there was really no way you could provision Variations in repeatable way in a supported fashion and had to use reflection to get the job done. The situation in SharePoint 2010 has changed a little. The process of creating Variations has been made more reliable my moving it completely to a Timer Job. So a new approach, requires new code, and here it is.</p>
<blockquote><p><strong>Updated Aug 30, 2010</strong>: the code sample of Step 2 has been updated. There was an issue that was causing SharePoint throw exception while trying to edit Variation Labels that were created programmatically.</p>
</blockquote>
<h2>Programmatically provisioning Variations</h2>
<p>The process of provisioning Variations consists of three steps:</p>
<ol>
<li>Configuring Variation Settings (Site Actions &gt; Site Settings &gt;Variations) </li>
<li>Configuring Variation Labels (Site Actions &gt; Site Settings &gt; Variation labels) </li>
<li>Creating Variation Hierarchies (Site Actions &gt; Site Settings &gt; Variation labels &gt; Create Hierarchies) </li>
</ol>
<p>So in order to programmatically provision Variations in a repeatable fashion, you have to cover all three steps in your code.</p>
<p>Before you read further keep in mind that there is still no public API for creating Variations available in SharePoint 2010. As you will notice earlier, the code examples I show in this article, use internal properties. And although you don’t have to use reflection anymore this approach is still unsupported.</p>
<h2>Step 1: Configuring Variation Settings</h2>
<p>Configuring Variation Settings can be done using the Site Actions &gt; Site Settings &gt; Variation page.</p>
<p><a href="http://mastykarz.nl/blog/images/Programmatica_73EB/variationsettings.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Variation Settings page in SharePoint Server 2010." src="http://mastykarz.nl/blog/images/Programmatica_73EB/variationsettings_thumb.png" width="480" height="380" /></a></p>
<p>As you can see this page hasn’t really changed since MOSS 2007 and contains the same settings as previously what makes it easy for us to write the code for:</p>
<pre class="brush: csharp;">private static void ConfigureVariationsSettings(SPWeb rootWeb)
{
    Guid varRelationshipsListId = new Guid(rootWeb.AllProperties[&quot;_VarRelationshipsListId&quot;] as string);
    SPList varRelationshipsList = rootWeb.Lists[varRelationshipsListId];
    SPFolder rootFolder = varRelationshipsList.RootFolder;
    // Automatic creation
    rootFolder.Properties[&quot;EnableAutoSpawnPropertyName&quot;] = &quot;true&quot;;
    // Recreate Deleted Target Page; set to false to enable recreation
    rootFolder.Properties[&quot;AutoSpawnStopAfterDeletePropertyName&quot;] = &quot;false&quot;;
    // Update Target Page Web Parts
    rootFolder.Properties[&quot;UpdateWebPartsPropertyName&quot;] = &quot;true&quot;;
    // Resources
    rootFolder.Properties[&quot;CopyResourcesPropertyName&quot;] = &quot;true&quot;;
    // Notification
    rootFolder.Properties[&quot;SendNotificationEmailPropertyName&quot;] = &quot;false&quot;;
    rootFolder.Properties[&quot;SourceVarRootWebTemplatePropertyName&quot;] = &quot;CMSPUBLISHING#0&quot;;
    rootFolder.Update();

    SPListItem item = null;
    if (varRelationshipsList.Items.Count &gt; 0)
    {
        item = varRelationshipsList.Items[0];
    }
    else
    {
        item = varRelationshipsList.Items.Add();
        item[&quot;GroupGuid&quot;] = new Guid(&quot;F68A02C8-2DCC-4894-B67D-BBAED5A066F9&quot;);
    }

    item[&quot;Deleted&quot;] = false;
    item[&quot;ObjectID&quot;] = rootWeb.ServerRelativeUrl;
    item[&quot;ParentAreaID&quot;] = String.Empty;
    item.Update();
}</pre>
<p>The Variations Setting are being stored in a hidden List in the Root Web. Because this List is provisioned dynamically, you can get a reference to it by getting the value of the <em>_VarRelationshipsListId</em> property. For every setting from the Variations Settings page there is a corresponding property in the Property Bag of the Root Folder of the hidden List. Probably the most confusing setting here is the <em>Recreate Deleted Target Page</em> setting, which has to be set to <em>false </em>in order to enable the recreation.</p>
<p>Among the properties you can also find the <em>SourceVarRootWebTemplatePropertyName</em> property which contains the name of the Site Definition used to provision new Variation Hierarchies. This corresponds to the <em>Source Variation</em> settings while configuring Variation Labels.</p>
<p><a href="http://mastykarz.nl/blog/images/Programmatica_73EB/sourcevariation.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Source Variation settings for configuring Variation Labels." src="http://mastykarz.nl/blog/images/Programmatica_73EB/sourcevariation_thumb.png" width="480" height="131" /></a></p>
<p>Next to the settings from the Variations Settings page, the hidden List contains one List Item which contains the configuration of the <em>Variation Home</em> setting.</p>
<p>Using the code snippet above you can provision the Variation Settings in a repeatable way.</p>
<h2>Step 2: Configuring Variation Labels</h2>
<p>Configuring Variation Labels in SharePoint Server 2010 is exactly the same as in MOSS 2007. You need to create a Variation Label for each variation in your site and once you’re done, you have to create the Variation Hierarchies.</p>
<p>Variation Labels can be provisioned using the following code snippet:</p>
<pre class="brush: csharp;">private static VariationLabel[] labels = {
    new VariationLabel
    {
        Title = &quot;nl-nl&quot;,
        FlagControlDisplayName = &quot;Nederlands&quot;,
        Language = &quot;nl-NL&quot;,
        Locale = 1043,
        HierarchyCreationMode = CreationMode.PublishingSitesAndAllPages,
        IsSource = true
    },
    new VariationLabel
    {
        Title = &quot;en-us&quot;,
        FlagControlDisplayName = &quot;English&quot;,
        Language = &quot;en-US&quot;,
        Locale = 1033,
        HierarchyCreationMode = CreationMode.PublishingSitesAndAllPages
    }
};

private static void CreateVariations(SPWeb rootWeb)
{
    Guid varListId = new Guid(rootWeb.AllProperties[&quot;_VarLabelsListId&quot;] as string);
    SPList varList = rootWeb.Lists[varListId];

    foreach (VariationLabel label in labels)
    {
        SPListItem item = varList.Items.Add();
        item[SPBuiltInFieldId.Title] = label.Title;
        item[&quot;Description&quot;] = label.Description;
        item[&quot;Flag Control Display Name&quot;] = label.FlagControlDisplayName;
        item[&quot;Language&quot;] = label.Language;
        item[&quot;Locale&quot;] = label.Locale.ToString();
        item[&quot;Hierarchy Creation Mode&quot;] = label.HierarchyCreationMode;
        item[&quot;Is Source&quot;] = label.IsSource.ToString();
        item[&quot;Hierarchy Is Created&quot;] = false;
        item.Update();
    }
}</pre>
<p>Similar to MOSS 2007, configuration of each Variation Label is stored as a List Item in a hidden list (different than the Variations Settings), so for every Variation Label you need to in fact create a List Item and fill it with the required information.</p>
<p>Running the code snippet above will create two Variation Labels in your Site Collection:</p>
<p><a href="http://mastykarz.nl/blog/images/Programmatica_73EB/varaitionlabels.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Dutch and English Variation Labels created using the code snippet above." src="http://mastykarz.nl/blog/images/Programmatica_73EB/varaitionlabels_thumb.png" width="480" height="192" /></a></p>
<h2>Step 3: Creating Variation Hierarchies</h2>
<p>This is the piece that has changed in SharePoint Server 2010 making creating Variation Hierarchies more stable and reliable. In MOSS 2007 Variation Hierarchies were created using a Long Running Operation in the w3wp.exe process. There were scenario’s when, if something went wrong, you had to perform IIS reset. As you can expect this would only break the whole process even further. In SharePoint Server 2010 creating Variation Hierarchies has been moved to a Timer Job which runs separately from the w3wp.exe process, which makes the whole thing more stable.</p>
<p>As the approach of creating Variation Hierarchies changed, the code that we used before became useless. The great thing about the new approach is, that because it relies on a Timer Job, it is easier to start and to control. You can programmatically create Variation Hierarchies using the following code snippet:</p>
<pre class="brush: csharp;">private static void CreateHierarchies(SPSite site, SPWeb rootWeb)
{
    site.AddWorkItem(Guid.Empty, DateTime.Now.ToUniversalTime(), new Guid(&quot;e7496be8-22a8-45bf-843a-d1bd83aceb25&quot;), rootWeb.ID, site.ID, 1, false, Guid.Empty, Guid.Empty, rootWeb.CurrentUser.ID, null, String.Empty, Guid.Empty, false);
    SPWebApplication webApplication = site.WebApplication;
    SPJobDefinition variationsJob = (from SPJobDefinition job in
                                     webApplication.JobDefinitions
                                     where job.Name == &quot;VariationsCreateHierarchies&quot;
                                     select job).FirstOrDefault();

    if (variationsJob != null)
    {
        DateTime startTime = DateTime.Now.ToUniversalTime();
        variationsJob.RunNow();

        // wait until the job is finished
        while ((from SPJobHistory j in webApplication.JobHistoryEntries where j.JobDefinitionId == variationsJob.Id &amp;&amp; j.StartTime &gt; startTime select j).Any() == false)
        {
            Thread.Sleep(100);
        }
    }
}</pre>
<p>The first thing that needs to be done is to add a work item. This is needed as the Timer Job responsible for creating Variation Hierarchies is a <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spworkitemjobdefinition.aspx">work-item timer job</a>. Once it’s in place, you can start the job. To do that you need a reference to the Timer Job which is scoped to Web Application.</p>
<p>In the code sample above I use a pause routine that waits until the job finishes. This is important in scenarios when provisioning Variation Hierarchies is not the last step and there are some other steps in the queue which depend on the Variations. You are free to skip this part if you don’t need it in your scenario.</p>
<p>And that’s it. After running this last piece of code the Variation Hierarchies have been created:</p>
<p><a href="http://mastykarz.nl/blog/images/Programmatica_73EB/variationhierarchies.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Variation Hierarchies created using the code snippet above." src="http://mastykarz.nl/blog/images/Programmatica_73EB/variationhierarchies_thumb.png" width="480" height="190" /></a></p>
<h2>Summary</h2>
<p>Variations are a great mechanism for delivering multilingual solutions. Provisioning Variations is a part of the configuration process and you should try to include it in your structure and repeatable deployment process. Although Variations in SharePoint Server 2010 have been improved and made more reliable, there is still no public API available for programmatically configuring and provisioning Variations. Although you don’t need to use reflection anymore in SharePoint Server 2010, you have to use hidden properties, which Variations depend upon, what makes any solution for programmatically provisioning Variations unsupported.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:29e61cf0-522c-4fc3-b18e-3d127374ddb8" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/SharePoint+Server+2010" rel="tag">SharePoint Server 2010</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Zry7qcq6jNE:pSUVDyH_1IA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Zry7qcq6jNE:pSUVDyH_1IA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Zry7qcq6jNE:pSUVDyH_1IA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=Zry7qcq6jNE:pSUVDyH_1IA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Zry7qcq6jNE:pSUVDyH_1IA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=Zry7qcq6jNE:pSUVDyH_1IA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=Zry7qcq6jNE:pSUVDyH_1IA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/Zry7qcq6jNE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/programmatically-provisioning-variations-in-sharepoint-server-2010/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/programmatically-provisioning-variations-in-sharepoint-server-2010/</feedburner:origLink></item>
		<item>
		<title>Programmatically determining which Claims Authentication Type has been used to login with Claims Based Authentication</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/TZOXlAVj0Wk/</link>
		<comments>http://blog.mastykarz.nl/programmatically-determining-claims-authentication-type-login-claims-based-authentication/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 06:05:17 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Claims]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/programmatically-determining-claims-authentication-type-login-claims-based-authentication/</guid>
		<description><![CDATA[Claims Based Authentication introduced with SharePoint 2010 allows you to login to a SharePoint site using multiple Authentication Providers. In some scenario you might need to determine which Claims Authentication Type has been used to login in order to conditionally show some content. Find out how this can be done using the new Claims API [...]]]></description>
			<content:encoded><![CDATA[<p>Claims Based Authentication introduced with SharePoint 2010 allows you to login to a SharePoint site using multiple Authentication Providers. In some scenario you might need to determine which Claims Authentication Type has been used to login in order to conditionally show some content. Find out how this can be done using the new Claims API provided with SharePoint 2010.</p>
<p>Determining the Claims Authentication Type used for logging in is very simple using the Claims API provided with SharePoint 2010 and can be done using the following code snippet:</p>
<pre class="brush: csharp;">string info = null;
SPClaimProviderManager mgr = SPClaimProviderManager.Local;
if (mgr != null)
{
    SPClaim userLogonNameClaim = mgr.DecodeClaim(SPContext.Current.Web.CurrentUser.LoginName);
    SPOriginalIssuerType issuerType = SPOriginalIssuers.GetIssuerType(userLogonNameClaim.OriginalIssuer);
    string issuerIdentifier = SPOriginalIssuers.GetIssuerIdentifier(userLogonNameClaim.OriginalIssuer);

    info = String.Format(&quot;type: {0}&lt;br /&gt;identifier: {1}&quot;, issuerType, issuerIdentifier);
}</pre>
<p>First you will need a reference to the current Claims Provider Manager (2). The next step is to turn the login name of the currently logged in user into a claim. This can be done using the DecodeClaim method (5). The type and the ID of the Claims Authentication Type used for authenticating the user is stored in the SPClaim.OriginalIssuer property. You can retrieve the type of the claim using the GetIssuerType method (6) and the identifier using the GetIssuerIdentifier method (7). Let’s have a look at a sample case.</p>
<p>Imagine you were logged in with a Forms Based Authentication user called <em>myuser</em>. The FBA Membership Provider registered with the Web Application is called <em>myprovider</em>. So after logging in the login name of the user would be something similar to: <em>i:0#.f|myprovider|myuser</em>. After using the code snippet above the <em>issuerType</em> would be set to <em>SPOriginalIssuerType.Forms</em> and the <em>issuerIdentifier</em> would contain the id of the FBA Membership Provider – <em>myprovider</em>.</p>
<p>In another scenario, when you would be logged in using a Windows account, using the same code snippet as presented above would return <em>SPOriginalIssuerType.Windows</em> for the type and an empty string for the identifier.</p>
<p>And that’s all you need to know in order to determine which Claims Authentication Type has been used for authenticating the user. Being able to distinct users using different authentication types can help you target and/or secure content or functionality in your solution.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:f3ecb084-a02b-4368-8f07-b6ecccb57238" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/Claims" rel="tag">Claims</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TZOXlAVj0Wk:dePEbrjEqhY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TZOXlAVj0Wk:dePEbrjEqhY:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TZOXlAVj0Wk:dePEbrjEqhY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=TZOXlAVj0Wk:dePEbrjEqhY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TZOXlAVj0Wk:dePEbrjEqhY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=TZOXlAVj0Wk:dePEbrjEqhY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=TZOXlAVj0Wk:dePEbrjEqhY:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/TZOXlAVj0Wk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/programmatically-determining-claims-authentication-type-login-claims-based-authentication/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/programmatically-determining-claims-authentication-type-login-claims-based-authentication/</feedburner:origLink></item>
		<item>
		<title>Programmatically converting login name to claim and vice versa</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/XncQDhVaLzE/</link>
		<comments>http://blog.mastykarz.nl/programmatically-converting-login-name-claim/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 20:06:26 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Claims]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/programmatically-converting-login-name-claim/</guid>
		<description><![CDATA[SharePoint 2010 introduced Claims Based Authentication. One of the consequences of this is the fact that in order to use Forms Based Authentication (FBA) you need to configure your Web Application to use Claims instead of Classic Authentication. One of the many changes that you notice while working with claims are different login names: while [...]]]></description>
			<content:encoded><![CDATA[<p>SharePoint 2010 introduced Claims Based Authentication. One of the consequences of this is the fact that in order to use Forms Based Authentication (FBA) you need to configure your Web Application to use Claims instead of Classic Authentication. One of the many changes that you notice while working with claims are different login names: while in SharePoint 2007 you used something like <em>myprovider:myuser</em>, SharePoint 2010 makes the claims-soup of it: <em>i:0#.f|myprovider|myuser</em>. And while this is something you can take into account for newly created solutions, it can get confusing when upgrading SharePoint 2007 solutions to SharePoint 2010, especially if all you need is the user name. So is String.Replace the only way to get it out or is there a better way?</p>
<p>It turns out that retrieving the user name from its claims representation is pretty straight forward and can be done using the following code snippet:</p>
<pre class="brush: csharp;">string userName = null;
SPClaimProviderManager mgr = SPClaimProviderManager.Local;
if (mgr != null)
{
    userName = mgr.DecodeClaim(SPContext.Current.Web.CurrentUser.LoginName).Value;
}</pre>
<p>First we retrieve a reference to the Claims Provider Manager configured with the current Web Application. Then, using the DecodeClaim(string) method, we convert the string into SPClaim and retrieve its value, which contains the login name of the current user.</p>
<p>So, assuming you were logged in with the <em>myuser</em> account and the value of the SPContext.Current.Web.CurrentUser.LoginName property was something similar to <em>i:0#.f|myprovider|myuser</em>, calling the code snippet above would return <em>myuser</em>.</p>
<h2>Claims back and forth</h2>
<p>In some scenario’s you might want to do the exact opposite: you might be starting off with a login name and will need to turn it over into the claims-based name. Just like in the previous scenario this can be easily done using the SPClaimProviderManager:</p>
<pre class="brush: csharp;">string userName = null;
SPClaimProviderManager mgr = SPClaimProviderManager.Local;
if (mgr != null)
{
    SPClaim claim = new SPClaim(SPClaimTypes.UserLogonName, &quot;myuser&quot;, &quot;http://www.w3.org/2001/XMLSchema#string&quot;, SPOriginalIssuers.Format(SPOriginalIssuerType.Forms, &quot;myprovider&quot;));
    userName = mgr.EncodeClaim(claim);
}</pre>
<p>Just as in the previous example we start off by getting a reference to the current Claims Provider Manager. The next step is to create a claim based on the login name of the current user. You can do this using the constructor of the SPClaim class. As the type you have to provide SPClaimTypes.UserLogonName, as the value – the login name of the user, as the value type, the XML type for string and finally, as the originalIssuer the name of your Membership Provider. In this sample I used a custom Forms Based Membership Provider but you might need some other type depending on your scenario.</p>
<p>In our example, if you needed the claims representation for the the <em>myuser</em> claims account, calling the above code snippet would return <em>i:0#.f|myprovider|myuser</em>.</p>
<p>And that’s it: converting the login names to claims and vice versa is that simple. And using the DecodeClaim and EncodeClaim methods makes it more reliable than parsing or building the strings manually.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:f2d95a79-5431-47fc-817b-a0538756cd22" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a>,<a href="http://technorati.com/tags/Claims" rel="tag">Claims</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=XncQDhVaLzE:n178mi4-wFo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=XncQDhVaLzE:n178mi4-wFo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=XncQDhVaLzE:n178mi4-wFo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=XncQDhVaLzE:n178mi4-wFo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=XncQDhVaLzE:n178mi4-wFo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=XncQDhVaLzE:n178mi4-wFo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=XncQDhVaLzE:n178mi4-wFo:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/XncQDhVaLzE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/programmatically-converting-login-name-claim/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/programmatically-converting-login-name-claim/</feedburner:origLink></item>
		<item>
		<title>Programmatically creating Sites and Site Collections from a Custom Web Template</title>
		<link>http://feedproxy.google.com/~r/WaldekMastykarz/~3/5deRqMaVWDg/</link>
		<comments>http://blog.mastykarz.nl/programmatically-creating-sites-site-collections-custom-web-template/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 13:33:34 +0000</pubDate>
		<dc:creator>Waldek Mastykarz</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Sandbox]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Structured and repeatable deployment]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://blog.mastykarz.nl/programmatically-creating-sites-site-collections-custom-web-template/</guid>
		<description><![CDATA[One of the great improvements in SharePoint 2010 are Web Templates. Mirjam van Olst wrote recently a great article about why using light-weight Web Templates is a better approach than using full blown Site Definitions. While using Web Templates for creating sites and Site Collections is pretty straight-forward things get complicated when you need to [...]]]></description>
			<content:encoded><![CDATA[<p>One of the great improvements in SharePoint 2010 are Web Templates. <a href="http://sharepointchick.com/">Mirjam van Olst</a> wrote recently <a href="http://sharepointchick.com/archive/2010/06/15/site-definitions-vs.-webtemplates.aspx">a great article about why using light-weight Web Templates is a better approach than using full blown Site Definitions</a>. While <a href="http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=218">using Web Templates for creating sites and Site Collections is pretty straight-forward</a> things get complicated when you need to create the Site Collection programmatically.</p>
<h2>The solution</h2>
<p>Let’s start with looking at a working code sample that allows you to create a Site Collection using a Web Template:</p>
<pre class="brush: csharp;">SPWebApplication webApp = SPWebApplication.Lookup(new Uri(&quot;http://win2008&quot;));
using (SPSite site = webApp.Sites.Add(&quot;/sites/site1&quot;, &quot;SharePoint&quot;, null, 1033, null, &quot;administrator&quot;, &quot;Administrator&quot;, &quot;admin@contoso.com&quot;))
{
    SPWeb rootWeb = site.RootWeb;

    // Get Solutions Gallery
    SPDocumentLibrary solutions = (SPDocumentLibrary)site.GetCatalog(SPListTemplateType.SolutionCatalog);
    // Upload Solution File with the Web Template
    SPFile solutionFile = solutions.RootFolder.Files.Add(&quot;test.wsp&quot;, File.ReadAllBytes(@&quot;..\..\test.wsp&quot;));
    // Activate Solution
    SPUserSolution solution = site.Solutions.Add(solutionFile.Item.ID);
    // Activate Features
    Guid solutionId = solution.SolutionId;

    // Activate Site Collection Features
    SPFeatureDefinitionCollection siteFeatures = site.FeatureDefinitions;
    var features = from SPFeatureDefinition f
                   in siteFeatures
                   where f.SolutionId.Equals(solutionId) &amp;&amp; f.Scope == SPFeatureScope.Site
                   select f;
    foreach (SPFeatureDefinition feature in features)
    {
        site.Features.Add(feature.Id, false, SPFeatureDefinitionScope.Site);
    }

    // Get Web Template
    SPWebTemplateCollection webTemplates = site.RootWeb.GetAvailableWebTemplates(1033);
    SPWebTemplate webTemplate = (from SPWebTemplate t
                                 in webTemplates
                                 where t.Title == &quot;test&quot;
                                 select t).FirstOrDefault();
    if (webTemplate != null)
    {
        site.RootWeb.ApplyWebTemplate(webTemplate.Name);
    }
}</pre>
<p>In order to create a new Site Collection you need a reference to the Web Application (1). You can create a new Site Collection by calling the SPSiteCollection.Add method (2). The important part of creating a Site Collection that uses a Web Template is, that you have to create a blank Site Collection at first and apply the template later. Todd discussed this in detail in his post.</p>
<p>After you create an empty Site Collection you can proceed with uploading the WSP file that contains the Web Template. You can do this by retrieving the reference of the Solutions Gallery (7) and adding the file to the Root Folder (9). While adding the file you need to store the reference to the SPFile object. Later on you will be needing the ID of the created List Item in order to activate the Sandboxed Solution.</p>
<p>The next step is to activate the Sandboxed Solution. You can do this by calling the SPUserSolutionCollection.Add method passing the ID of the solution file stored earlier (11). Important difference while activating a Sandboxed Solution programmatically and using the web UI is, that when using code no Features are getting activated. So in order to be able to use your Web Template you need to activate the Site Collection Features from the Sandboxed Solution.</p>
<p>In order to activate the Site Collection Features from the Sandboxed Solution you need the Solution ID (13). Using this ID you can find out which Features are a part of the Sandboxed Solution and should be activated. You can easily retrieve the Features using LINQ (16-20). The things that you have to check for are the Solution ID and Feature’s Scope (19): only Site Collection scoped Features must be activated. Site scoped Features are getting activated automatically by the Web Template itself when applied to the Site. If you activate Site scoped Features you will get error while applying the Web Template to your Site. While activating the Features it’s important to use the Add(Guid, bool, SPFeatureDefinitionScope) overload (23). By setting the third parameter to SPFeatureDefinitionScope.Site you let SharePoint know that the Feature is a part of a Sandboxed Solution. If you use a different overload or pass a different value you will get an exception during the Feature activation process.</p>
<p>The next step is to retrieve the Web Template that you want to apply to your empty Site Collection. You can do this by searching the list of available Web Templates (27) for a Web Template with the name provided while saving the Site as Template (test in this example; 30).</p>
<p>The last step is to apply the Web Template to the Site Collection. While using Web Templates you have to use the SPWeb.ApplyWebTemplate(string) overload (34). Web Templates are represented in the SharePoint API using the SPFeatureWebTemplate class which is internal and cannot be used in your code. By providing the name of the Web Template instead, you let SharePoint find the right Web Template for you. If you try to use the SPWeb.ApplyWebTemplate(SPWebTemplate) overload you will end up with a broken Site.</p>
<p>And that’s it. Using the code above allows you to programmatically create Sites and Site Collections based on Web Templates.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:541bc68e-a73d-4e15-95db-2131acea6fe9" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/SharePoint+2010" rel="tag">SharePoint 2010</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=5deRqMaVWDg:0wOXSyiLLfo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=5deRqMaVWDg:0wOXSyiLLfo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=5deRqMaVWDg:0wOXSyiLLfo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=5deRqMaVWDg:0wOXSyiLLfo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=5deRqMaVWDg:0wOXSyiLLfo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/WaldekMastykarz?a=5deRqMaVWDg:0wOXSyiLLfo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/WaldekMastykarz?i=5deRqMaVWDg:0wOXSyiLLfo:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/WaldekMastykarz/~4/5deRqMaVWDg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.mastykarz.nl/programmatically-creating-sites-site-collections-custom-web-template/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		<feedburner:origLink>http://blog.mastykarz.nl/programmatically-creating-sites-site-collections-custom-web-template/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.724 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-09-07 23:21:24 -->
