<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>A rolling stone gathers no... MOSS 2007 / SharePoint 2010 &#187; Site Definitions</title>
	<atom:link href="http://statto1974.wordpress.com/category/site-definitions/feed/" rel="self" type="application/rss+xml" />
	<link>http://statto1974.wordpress.com</link>
	<description>My musings on SharePoint products and technologies</description>
	<lastBuildDate>Mon, 26 Oct 2009 15:49:31 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='statto1974.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/c0d72f166c2a7a17fc1b00b13ec3c270?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>A rolling stone gathers no... MOSS 2007 / SharePoint 2010 &#187; Site Definitions</title>
		<link>http://statto1974.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://statto1974.wordpress.com/osd.xml" title="A rolling stone gathers no&#8230; MOSS 2007 / SharePoint 2010" />
		<item>
		<title>Using a custom master page in a site definition</title>
		<link>http://statto1974.wordpress.com/2007/04/30/using-a-custom-master-page-in-a-site-definition/</link>
		<comments>http://statto1974.wordpress.com/2007/04/30/using-a-custom-master-page-in-a-site-definition/#comments</comments>
		<pubDate>Mon, 30 Apr 2007 18:33:25 +0000</pubDate>
		<dc:creator>Toby</dc:creator>
				<category><![CDATA[Master Pages]]></category>
		<category><![CDATA[Site Definitions]]></category>

		<guid isPermaLink="false">http://statto1974.wordpress.com/2007/04/30/using-a-custom-master-page-in-a-site-definition/</guid>
		<description><![CDATA[UPDATE
Don&#8217;t use the Sharepoint Solution Generator, so far we have not been able to upgrade the site definitions through a solution without it killing existing sites based on the site definition. 
I have seen many different ways of doing this, but I found the following method seemed to work for me, using the &#8220;SharePoint Extensions for Visual [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=statto1974.wordpress.com&blog=1043105&post=6&subd=statto1974&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="margin-left:1pt;"><font color="#800000">UPDATE</font></p>
<p style="margin-left:1pt;"><font color="#800000">Don&#8217;t use the Sharepoint Solution Generator, so far we have not been able to upgrade the site definitions through a solution without it killing existing sites based on the site definition.</font> </p>
<p style="margin-left:1pt;">I have seen many different ways of doing this, but I found the following method seemed to work for me, using the &#8220;SharePoint Extensions for Visual Studio 2005&#8243; and the &#8220;<strike>SharePoint Solutions Generator</strike>&#8220;</p>
<ul>
<li><strike>Use the &#8220;SharePoint Solution Generator&#8221; to create a site definition project.</strike></li>
<li>Open the project and add your custom master page to the &#8220;Site Definition&#8221; folder</li>
</ul>
<p><img src="http://statto1974.files.wordpress.com/2007/04/043007-1833-usingacusto1.jpg" /></p>
<ul>
<li>Open up &#8220;onet.xml&#8221;</li>
<li>Add the following node to the &#8220;ListTemplates&#8221; section</li>
</ul>
<blockquote><p><span style="font-size:8pt;font-family:Courier New;"><span style="color:maroon;">&lt;ListTemplate </span><span style="color:red;">Name</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">mplib</span><span style="color:maroon;">&#8221; </span><span style="color:red;">DisplayName</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">$Resources:MasterPageGallery;</span><span style="color:maroon;">&#8221; </span><span style="color:red;">Description</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">$Resources:global_onet_mplib_desc;</span><span style="color:maroon;">&#8221; </span><span style="color:red;">SetupPath</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">global\lists\mplib</span><span style="color:maroon;">&#8221; </span><span style="color:red;">Type</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">116</span><span style="color:maroon;">&#8221; </span><span style="color:red;">BaseType</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">1</span><span style="color:maroon;">&#8221; </span><span style="color:red;">Path</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">GLOBAL</span><span style="color:maroon;">&#8221; </span><span style="color:red;">Hidden</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">TRUE</span><span style="color:maroon;">&#8221; </span><span style="color:red;">HiddenList</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">TRUE</span><span style="color:maroon;">&#8221; </span><span style="color:red;">NoCrawl</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">TRUE</span><span style="color:maroon;">&#8221; </span><span style="color:red;">Unique</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">TRUE</span><span style="color:maroon;">&#8221; </span><span style="color:red;">Catalog</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">TRUE</span><span style="color:maroon;">&#8221; </span><span style="color:red;">OnQuickLaunch</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">FALSE</span><span style="color:maroon;">&#8221; </span><span style="color:red;">SecurityBits</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">11</span><span style="color:maroon;">&#8221; </span><span style="color:red;">AllowDeletion</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">FALSE</span><span style="color:maroon;">&#8221; </span><span style="color:red;">AllowEveryoneViewItems</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">TRUE</span><span style="color:maroon;">&#8221; </span><span style="color:red;">Image</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">/_layouts/images/itdl.gif</span><span style="color:maroon;">&#8221; </span><span style="color:red;">AlwaysIncludeContent</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">TRUE</span><span style="color:maroon;">&#8221; </span><span style="color:red;">DocumentTemplate</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">100</span><span style="color:maroon;">&#8221; /&gt;</span></span></p></blockquote>
<ul>
<li>Add the &#8220;MasterUrl&#8221; attribute to the &#8220;Configuration&#8221; node with a value of &#8220;_catalogs/masterpage/project.master&#8221;, where project.master is the name of your custom master page. This means all the pages using the &#8220;~masterurl/default.master&#8221; token will use the URL defined to point to your custom master page</li>
</ul>
<blockquote><p><span style="font-size:8pt;font-family:Courier New;"><span style="color:maroon;">&lt;Configuration </span><span style="color:red;">ID</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">0</span><span style="color:maroon;">&#8221; </span><span style="color:red;">Name</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">Default</span><span style="color:maroon;">&#8221; </span><span style="color:red;">MasterUrl</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">_catalogs/masterpage/project.master</span><span style="color:maroon;">&#8220;&gt;</span></span></p></blockquote>
<ul>
<li>Add a &#8220;Module&#8221; node to the Modules section of the configuration called &#8220;MasterPage&#8221; that will reference the module definition in the &#8220;Modules&#8221; section of the onet file</li>
</ul>
<blockquote><p><span style="font-size:8pt;font-family:Courier New;"><span style="color:maroon;">&lt;Module </span><span style="color:red;">Name</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">MasterPage</span><span style="color:maroon;">&#8221; /&gt;</span></span></p></blockquote>
<ul>
<li>Add a module definition to the &#8220;Modules&#8221; section of the onet file. This will copy the custom master page file into the master page library when the site is provisioned.</li>
</ul>
<blockquote><p><span style="font-size:8pt;font-family:Courier New;"><span style="color:maroon;">&lt;Module </span><span style="color:red;">Name</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">MasterPage</span><span style="color:maroon;">&#8221; </span><span style="color:red;">List</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">116</span><span style="color:maroon;">&#8221; </span><span style="color:red;">Url</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">_catalogs/masterpage</span><span style="color:maroon;">&#8221; </span><span style="color:red;">RootWebOnly</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">FALSE</span><span style="color:maroon;">&#8220;&gt;</span></span></p></blockquote>
<blockquote>
<p style="margin-left:27pt;"><span style="font-size:8pt;font-family:Courier New;"><span style="color:maroon;">&lt;File </span><span style="color:red;">Url</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">project.master</span><span style="color:maroon;">&#8221; </span><span style="color:red;">Type</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">GhostableInLibrary</span><span style="color:maroon;">&#8221; </span><span style="color:red;">IgnoreIfAlreadyExists</span><span style="color:maroon;">=&#8221;</span><span style="color:blue;">TRUE</span><span style="color:maroon;">&#8221; /&gt;</span></span></p>
</blockquote>
<blockquote><p><span style="font-size:8pt;color:maroon;font-family:Courier New;">&lt;/Module&gt;</span></p></blockquote>
<ul>
<li>Save the onet file and then deploy the project into your environment using the deploy option in &#8220;SharePoint Extensions for VS 2005&#8243;</li>
<li>When you create a new site from your site definition it should now use your new master page.</li>
</ul>
<p>Below is a screen grab of the onet.xml file with all the changes highlighted</p>
<p style="margin-left:19pt;"><img width="485" src="http://statto1974.files.wordpress.com/2007/04/043007-1833-usingacusto2.jpg" height="378" /> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/statto1974.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/statto1974.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/statto1974.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/statto1974.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/statto1974.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/statto1974.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/statto1974.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/statto1974.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/statto1974.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/statto1974.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/statto1974.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/statto1974.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=statto1974.wordpress.com&blog=1043105&post=6&subd=statto1974&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://statto1974.wordpress.com/2007/04/30/using-a-custom-master-page-in-a-site-definition/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64ee6e5e0ecaca8c6af952db6a29fc89?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">statto1974</media:title>
		</media:content>

		<media:content url="http://statto1974.files.wordpress.com/2007/04/043007-1833-usingacusto1.jpg" medium="image" />

		<media:content url="http://statto1974.files.wordpress.com/2007/04/043007-1833-usingacusto2.jpg" medium="image" />
	</item>
	</channel>
</rss>