<?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/"
	>

<channel>
	<title>Buta no Ie &#187; master page</title>
	<atom:link href="http://singchan.com/tag/master-page/feed/" rel="self" type="application/rss+xml" />
	<link>http://singchan.com</link>
	<description>The House of Pork and User Experience Development</description>
	<lastBuildDate>Tue, 11 Oct 2011 22:08:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Branding SharePoint 2010 Collaboration Sites &#8211; Part 3 in a Series</title>
		<link>http://singchan.com/2010/02/23/branding-sharepoint-2010-collaboration-sites-part-3-in-a-series/</link>
		<comments>http://singchan.com/2010/02/23/branding-sharepoint-2010-collaboration-sites-part-3-in-a-series/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 16:04:48 +0000</pubDate>
		<dc:creator>Buta</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[collaboration]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[DelegateControl]]></category>
		<category><![CDATA[master page]]></category>
		<category><![CDATA[SPC09]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[theming system]]></category>
		<category><![CDATA[ue]]></category>
		<category><![CDATA[user experience]]></category>

		<guid isPermaLink="false">http://singchan.com/?p=181</guid>
		<description><![CDATA[In part two, we posted about how to register our custom style sheets in a way that we could still take advantage of the new SharePoint 2010 colour switching theming engine. In this post we&#8217;ll go through how to do this without having to modify the out-of-the-box master pages or having to use custom master [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://singchan.com/2009/12/29/branding-sharepoint-2010-collaboration-sites-part-2-in-a-series/" title="Branding SharePoint 2010 Collaboration Sites - Part 2 in a Series">part two</a>, we posted about how to register our custom style sheets in a way that we could still take advantage of the new SharePoint 2010 colour switching theming engine. In this post we&#8217;ll go through how to do this without having to modify the out-of-the-box master pages or having to use custom master pages for your sites.</p>
<h3>Delegate Controls</h3>
<p>As I mentioned at the end of part two, the way we&#8217;re going to get our CSS added to our sites and pages is through the use of a <strong>delegate control</strong>. For those of you who aren&#8217;t familiar with delegate controls, they are essentially placeholders for you to inject your own controls via a feature. Your feature can be scoped to either <em>Web</em>, <em>Site</em>, <em>WebApplication</em> or <em>Farm</em>. I&#8217;m going to keep the explanation on delegate controls short as there&#8217;s plenty of information out there about them:</p>
<ul>
<li><a href="http://www.sharepointnutsandbolts.com/2007/06/using-delegate-control.html">Chris O&#8217;Brien: Using the Delegate Control</a></li>
<li><a href="http://www.devx.com/enterprise/Article/36628/1954">SharePoint&#8217;s Delegate Control Power</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.delegatecontrol%28office.14%29.aspx">MSDN 2010 SDK: DelegateControl Class</a></li>
</ul>
<div id="attachment_204" class="wp-caption alignright" style="width: 160px"><a href="http://singchan.com/wordpress/wp-content/uploads/2010/02/AdditionalPageHead.png" rel="lightbox[181]" title="AdditionalPageHead Delegate Control"><img src="http://singchan.com/wordpress/wp-content/uploads/2010/02/AdditionalPageHead-150x150.png" alt="Screenshot of AdditionalPageHead delegate control in v4.master" title="AdditionalPageHead Delegate Control" width="150" height="150" class="size-thumbnail wp-image-204" /></a><p class="wp-caption-text">AdditionalPageHead Delegate Control</p></div>
<h3>The AdditionalPageHead Delegate</h3>
<p>Delegate controls have a <strong>AllowMultipleControls</strong> property which when set to <em>true</em>, all controls keyed to that delegate are added to the page; when set to <em>false</em>, only the control registered with the lowest <em>sequence</em> value is added to the page.</p>
<p>All of the delegate controls in the OOTB master pages have <strong>AllowMultipleControls</strong> set to <em>false</em>, with the exception of one, <strong>AdditionalPageHead</strong>, which does allow multiple controls. And guess what? AdditionalPageHead is actually located in the page head, where you would normally add CSS
<link> elements! This is the perfect place for us to inject any CSS registration controls.</p>
<h3>Putting it all together&#8230;</h3>
<p>Let&#8217;s put together a simple solution using the Visual Studio 2010 SharePoint Tools which will:</p>
<ol>
<li>deploy our CSS file in the <strong>Themable</strong> folder in the <em>/Layouts/1033/Styles</em></li>
<li>deploy a user control into the <em>ControlTemplates</em> folder which uses the <strong>CSSRegistration</strong> control to register our CSS</li>
<li>install a feature which inserts our user control onto our pages via the <strong>AdditionalPageHead</strong> delegate</li>
</ol>
<h4>The CSS</h4>
<p>Keeping it simple, all our CSS does is set the background color of the &lt;body&gt;. We&#8217;ll use #FFF (white) as our default background color and also decorate the rule with one of the SharePoint 2010 compile time directives to whatever we might set the &#8220;Light1&#8243; color value as through the Theme UI.</p>
<pre class="brush: plain; title: ; notranslate">
body {
/*[ReplaceColor(themeColor:&quot;Light1&quot;)]*/
background-color: #fff;
}
</pre>
<h4>The Delegate Control</h4>
<p>Again, nice and simple, we&#8217;re going to use the CSSRegistration control to register our branding CSS after corev4.css:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;%@ Assembly Name=&quot;$SharePoint.Project.AssemblyFullName$&quot; %&gt;
&lt;%@ Register Tagprefix=&quot;SharePoint&quot; Namespace=&quot;Microsoft.SharePoint.WebControls&quot; Assembly=&quot;Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&quot; %&gt;

&lt;sharepoint :CSSRegistration Name=&quot;&lt;% $SPUrl:~sitecollection/_layouts/1033/Styles/Themable/SingChan.SP2010.Branding/branding.css %&gt;&quot; After=&quot;corev4.css&quot; runat=&quot;server&quot; /&gt;
&lt;/sharepoint&gt;
</pre>
<h4>Element Manifest</h4>
<p>And finally we&#8217;ll define our element manifest for our delegate feature:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;elements xmlns=&quot;http://schemas.microsoft.com/sharepoint/&quot;&gt;
    &lt;control Id=&quot;AdditionalPageHead&quot; Sequence=&quot;80&quot; ControlSrc=&quot;~/_ControlTemplates/SingChan.SP2010.Branding/CSSRegistrationControl.ascx&quot; /&gt;
&lt;/elements&gt;
</pre>
<p>You&#8217;ll most likely scope your delegate feature to either <em>Web</em> or <em>Site</em> for branding purposes. I tend to scope my feature at the site collection level to achieve a consistent brand across all the webs in the site collection. If there&#8217;s a requirement to have different branding for one or two specific sites, then we can always have a second feature which deploys those overrides at a web-level scope. If you have vastly different brands across webs in your site collection, then you may want to scope only at the web level so that your brands don&#8217;t conflict or end up with any style inheritance issues.</p>
<h3>That&#8217;s it!</h3>
<p>If all went well, we should see the link to our style sheet emitted after the link to corev4.css!<br />
<div id="attachment_210" class="wp-caption aligncenter" style="width: 160px"><a href="http://singchan.com/wordpress/wp-content/uploads/2010/02/brandingcss.png" rel="lightbox[181]" title="Branding CSS in HTML Source"><img src="http://singchan.com/wordpress/wp-content/uploads/2010/02/brandingcss-150x150.png" alt="Screen shot of HTML source of page containing a link to the branding CSS." title="Branding CSS in HTML Source" width="150" height="150" class="size-thumbnail wp-image-210" /></a><p class="wp-caption-text">Our branding CSS being emitted in HTML</p></div></link>
<p>If all is not well, here&#8217;s the ZIP file containing the branding VS2010 solution for reference:<br />
<a href='http://singchan.com/wordpress/wp-content/uploads/2010/02/SingChan.SP2010.Branding.zip' title="ZIP file containing the branding VS2010 solution">SingChan.SP2010.Branding.zip</a></p>
<h3>Previously&#8230;</h3>
<ul>
<li><a title="Branding SharePoint 2010 Collaboration Sites: Part 1" href="/2009/12/23/branding-sharepoint-2010-collaboration-sites-part-1-in-a-series/">You can find Part One here!</a></li>
<li><a title="Branding SharePoint 2010 Collaboration Sites: Part 2" href="/2009/12/29/branding-sharepoint-2010-collaboration-sites-part-2-in-a-series/">You can find Part Two here!</a></li>
</ul>
<p><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://singchan.com/2010/02/23/branding-sharepoint-2010-collaboration-sites-part-3-in-a-series/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>SharePoint 2010: Upgrading your Public Beta solutions to RC</title>
		<link>http://singchan.com/2010/02/11/sharepoint-2010-upgrading-your-public-beta-solutions-to-rc/</link>
		<comments>http://singchan.com/2010/02/11/sharepoint-2010-upgrading-your-public-beta-solutions-to-rc/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 17:42:38 +0000</pubDate>
		<dc:creator>Buta</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[beta 2]]></category>
		<category><![CDATA[master page]]></category>
		<category><![CDATA[page layout]]></category>
		<category><![CDATA[public beta]]></category>
		<category><![CDATA[RC]]></category>
		<category><![CDATA[release candidate]]></category>
		<category><![CDATA[site template]]></category>

		<guid isPermaLink="false">http://singchan.com/?p=188</guid>
		<description><![CDATA[A word to the wise, if you&#8217;re planning on upgrading your solutions developed on the public beta to the new SharePoint 2010 Release Candidate, double check your code! This is especially true if you have custom master pages, page layouts, or site templates which are derived from the OOTB ones. Here&#8217;s a simple screen grab [...]]]></description>
			<content:encoded><![CDATA[<p>A word to the wise, if you&#8217;re planning on upgrading your solutions developed on the public beta to the new SharePoint 2010 Release Candidate, double check your code!</p>
<p>This is especially true if you have custom master pages, page layouts, or site templates which are derived from the OOTB ones.</p>
<p>Here&#8217;s a simple screen grab of a diff between the Public Beta v4.master and the version in the RC:</p>
<div id="attachment_189" class="wp-caption aligncenter" style="width: 310px"><a href="http://singchan.com/wordpress/wp-content/uploads/2010/02/v4master_diff.png" rel="lightbox[188]" title="V4.master Diff"><img class="size-medium wp-image-189" title="V4.master Diff" src="http://singchan.com/wordpress/wp-content/uploads/2010/02/v4master_diff-300x217.png" alt="Screenshot of differences between the public beta and RC v4.master pages." width="300" height="217" /></a><p class="wp-caption-text">v4.master differences</p></div>
<p>Notice one of the Site Actions menu items has been removed in the RC and permissions are slightly different in another. There are other small differences in the v4.master like some of the sprite co-ordinates have changed for the help and recycle bin icons which might leave you scratching your head as to why the wrong image is showing up.</p>
<p>The v4.master is just a short example. I found quite a few differences in the Blog site template and spent quite a bit of time doing diffs and merging my customizations back into the updated RC versions.</p>
<p>If you&#8217;re using TFS for your source control, I found it helpful to just copy and paste the contents of original version of whatever file you customized into your versioned control file and then doing a difference/merge between that and the last version checked-in.<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://singchan.com/2010/02/11/sharepoint-2010-upgrading-your-public-beta-solutions-to-rc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPC09: Master Pages</title>
		<link>http://singchan.com/2009/10/21/spc09-master-pages/</link>
		<comments>http://singchan.com/2009/10/21/spc09-master-pages/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 23:58:13 +0000</pubDate>
		<dc:creator>Buta</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[master page]]></category>
		<category><![CDATA[SPC09]]></category>

		<guid isPermaLink="false">http://singchan.com/?p=62</guid>
		<description><![CDATA[A quickie: no more application.master! In Microsoft SharePoint Foundation, application pages can now inherit a customized site master page through the DynamicMasterPageFile attribute. In addition, there are a few pages which have been designated as Safeguarded Application Pages. These are the application pages that have safeguards against a broken master page. If these pages encounter an [...]]]></description>
			<content:encoded><![CDATA[<p>A quickie: no more application.master!</p>
<p>In Microsoft SharePoint Foundation, application pages can now inherit a customized site master page through the <span><span>DynamicMasterPageFile</span></span> attribute.</p>
<p>In addition, there are a few pages which have been designated as Safeguarded Application Pages. These are the application pages that have safeguards against a broken master page. If these pages encounter an error when loading the dynamic master page, a safe master page in the _layouts folder is loaded instead.</p>
<ul>
<li>AccessDenied.aspx</li>
<li>MngSiteAdmin.aspx</li>
<li>People.aspx</li>
<li>RecycleBin.aspx</li>
<li>ReGhost.aspx</li>
<li>ReqAcc.aspx</li>
<li>Settings.aspx</li>
<li>UserDisp.aspx</li>
<li>ViewLsts.aspx</li>
</ul>
<p style="DISPLAY: block">Check out the <a title="MSDN documentation on SharePoint 2010 master pages." href="http://msdn.microsoft.com/en-us/library/ms443795(office.14).aspx" target="_blank">documentation on MSDN</a> regarding master pages in SharePoint 2010.</p>
<p><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://singchan.com/2009/10/21/spc09-master-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

