<?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>Andy Burns' SharePoint Blog &#187; Branding</title>
	<atom:link href="http://www.novolocus.com/category/sharepoint/sharepoint-2007/branding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.novolocus.com</link>
	<description>Whatever I'm working on, really...</description>
	<lastBuildDate>Mon, 08 Feb 2010 08:00:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adding CSS links to your SharePoint pages or code&#8230;</title>
		<link>http://www.novolocus.com/2009/07/20/adding-css-links-to-your-pages-or-code/</link>
		<comments>http://www.novolocus.com/2009/07/20/adding-css-links-to-your-pages-or-code/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 11:14:29 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSSRegistration]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=1601</guid>
		<description><![CDATA[I love Twitter &#8211; you get some though provoking questions on it. Thomas Resing asked the other day:
How are you applying styles to your custom web parts in #SharePoint? using CSSClass property, stuck on deploying css &#60;Link&#62; tag in the head
Well, for pages themselves you have the CSSRegistration control. It&#8217;s an ASP.NET control, and looks [...]]]></description>
			<content:encoded><![CDATA[<p>I love Twitter &#8211; you get some though provoking questions on it. <a href="http://twitter.com/resing">Thomas Resing</a> asked the other day:</p>
<blockquote><p>How are you applying styles to your custom web parts in <a title="#SharePoint" href="http://twitter.com/search?q=%23SharePoint">#SharePoint</a>? using CSSClass property, stuck on deploying css &lt;Link&gt; tag in the head</p></blockquote>
<p>Well, for pages themselves you have the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.cssregistration.aspx"><strong>CSSRegistration </strong></a>control. It&#8217;s an ASP.NET control, and looks something like:</p>
<p><code>&lt;SharePoint:CssRegistration name=<span>"/_layouts/myBrand/SomeStyle.css"</span> runat=<span>"server"</span>/&gt;</code></p>
<p>This control registers the URL with the page, but doesn&#8217;t emit anything. That&#8217;s controlled by the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.csslink.aspx"><strong>CssLink</strong> </a>control:</p>
<p><code>&lt;Sharepoint:CssLink runat=<span>"server"</span> /&gt;</code></p>
<p>It actually outputs the &lt;link&gt; elements, and this means that you can have a <strong>CSSRegistration</strong> control low down in the page (in a <strong>Content</strong> control, for example) and you can still output it in the &lt;head&gt; of your page. There&#8217;s a <a href="http://www.cleverworkarounds.com/2007/10/08/sharepoint-branding-how-css-works-with-master-pages-part-1/">good post about this</a> on CleverWorkarounds. </p>
<p>So, could we use that control? Well, we should be able to instantiate one &#8211; except it turns out that we don&#8217;t have to. We can just use the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.cssregistration.register.aspx"><strong>CSSRegistration.Register()</strong> </a>static method &#8211; something like:</p>
<p><code>protected override void CreateChildControls(){<br />
CssRegistration.Register("/_layouts/myBrand/SomeStyle.css");<br />
}</code></p>
<p>Job done&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2009/07/20/adding-css-links-to-your-pages-or-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rounded Corners on Web Parts</title>
		<link>http://www.novolocus.com/2009/06/30/rounded-corners-on-web-parts/</link>
		<comments>http://www.novolocus.com/2009/06/30/rounded-corners-on-web-parts/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 11:40:20 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Rounded Corners]]></category>
		<category><![CDATA[Web Parts]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=1562</guid>
		<description><![CDATA[The Holy Grail of SharePoint branding - at least as far as I&#8217;m concerned &#8211; is rounded corners on Web Parts. Every design that comes in has this at first. As mentioned yesterday there are examples of doing this for the web part&#8217;s title - I&#8217;ve done this using Madalina&#8217;s instructions and Heather Solomon has some instructions too.
However, as far as [...]]]></description>
			<content:encoded><![CDATA[<p>The Holy Grail of SharePoint branding - at least as far as I&#8217;m concerned &#8211; is rounded corners on Web Parts. Every design that comes in has this at first. As mentioned yesterday there are examples of doing this for the web part&#8217;s title - <a href="http://www.novolocus.com/2008/10/09/rounded-corners-are-cool-in-sharepoint-apparently/">I&#8217;ve done this</a> using <a href="http://madalina.blog.com/2705257/">Madalina&#8217;s instructions</a> and <a href="http://www.heathersolomon.com/blog/articles/brandsppart3a.aspx">Heather Solomon has some instructions too</a>.</p>
<p>However, as far as I know nobody has yet figured out a way of putting rounded corners on the bottom corners of web parts. The HTML they have does not suit them to do this via CSS. The only idea I&#8217;ve had previously was to use <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter.aspx"><strong>ControlAdapter</strong></a>s to modify the output of of the Web Part itself. And I&#8217;m pretty sure you&#8217;d have to write an adapter per web parts. That kind of sucks; no customer is going to be in a hurry to pay for that.</p>
<p>Well, when I was looking at <a href="http://www.novolocus.com/2009/06/29/rounded-corners-on-web-part-zones/">putting borders around an entire web part zone</a>, I had a thought. What we really need to do is insert elements into our page. jQuery can do that sort of thing. Could I use jQuery to find each web part and wrap some tags around it?<span id="more-1562"></span></p>
<p>Looking in the HTML produced for a page, I noticed that web parts all seem to exist in a table cell with an ID that begins &#8216;<em>MSOZoneCell_WebPart</em>&#8216; so I tried querying for that, and wrapping it in DIV tags (the same structure as used yesterday for the whole zone):</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/Jquery-to-put-corners-around-web-parts.PNG"><img class="alignnone size-medium wp-image-1564" title="Jquery to put corners around web parts" src="http://www.novolocus.com/wp-content/uploads/2009/06/Jquery-to-put-corners-around-web-parts-300x150.PNG" alt="Jquery to put corners around web parts" width="300" height="150" /></a></p>
<p>Erm, this worked (Image below is just one web part zone):</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/Individual-Web-part-borders.PNG"><img class="alignnone size-medium wp-image-1566" title="Individual Web part  borders" src="http://www.novolocus.com/wp-content/uploads/2009/06/Individual-Web-part-borders-300x246.PNG" alt="Individual Web part  borders" width="300" height="246" /></a></p>
<p>Clearly, that style sucks. And you&#8217;d want to work on the styles of the web parts themselves &#8211; removing borders and the like. And I think that having separately styled &#8216;titles&#8217; and &#8216;bodies&#8217; might be&#8230; awkward. But those are borders around individual web parts. They do show up in <em>Edit</em> mode, and they do move when you drag the web parts around:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/jQuery-corners-in-Edit-mode.PNG"><img class="alignnone size-medium wp-image-1567" title="jQuery corners in Edit mode" src="http://www.novolocus.com/wp-content/uploads/2009/06/jQuery-corners-in-Edit-mode-300x290.PNG" alt="jQuery corners in Edit mode" width="300" height="290" /></a></p>
<p>Unfortunately, I do seem to be getting a JavaScript Error now. When I open it up to look at it I see:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/Error-from-jQuery-Webpart.PNG"><img class="alignnone size-medium wp-image-1568" title="Error from jQuery Webpart" src="http://www.novolocus.com/wp-content/uploads/2009/06/Error-from-jQuery-Webpart-300x194.PNG" alt="Error from jQuery Webpart" width="300" height="194" /></a></p>
<p>I&#8217;m pretty sure I&#8217;ve never written 120 million lines of code, so I&#8217;m not quite sure what&#8217;s going on here. It doesn&#8217;t seem to cause any problems though. I don&#8217;t know if somone can take this prototype on and solve that one &#8211; but I can&#8217;t find the problem. It sounds very similar to <a href="http://dev.jquery.com/ticket/4765">this bug report</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2009/06/30/rounded-corners-on-web-parts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Rounded Corners on Web Part Zones</title>
		<link>http://www.novolocus.com/2009/06/29/rounded-corners-on-web-part-zones/</link>
		<comments>http://www.novolocus.com/2009/06/29/rounded-corners-on-web-part-zones/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 10:50:10 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Rounded Corners]]></category>
		<category><![CDATA[Web Part Zones]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=1553</guid>
		<description><![CDATA[Curiously, one of my more popular blog posts is about putting rounded corners on things in SharePoint. It does seem that this is a pretty popular question. As a side note, Heather Solomon has a post about doing this for web part titles, though I followed Madalina&#8217;s instructions.
Anyway, one design requirement that come up repeatedly [...]]]></description>
			<content:encoded><![CDATA[<p>Curiously, one of my more popular blog posts is about <a href="http://www.novolocus.com/2008/10/09/rounded-corners-are-cool-in-sharepoint-apparently/">putting rounded corners on things in SharePoint</a>. It does seem that this is a pretty popular question. As a side note, Heather Solomon has a post about <a href="http://www.heathersolomon.com/blog/articles/brandsppart3a.aspx">doing this for web part titles</a>, though <a href="http://madalina.blog.com/2705257/">I followed Madalina&#8217;s instructions</a>.</p>
<p>Anyway, one design requirement that come up repeatedly is rounded borders on Web Parts. I swear, it comes up with every design &#8211; and it isn&#8217;t possible (although I have an idea &#8211; more on that tomorrow). What you can do, though, is have a rounded border about the entire web part zone&#8230;<span id="more-1553"></span></p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/2-Web-Parts-in-two-Zones.PNG"><img class="alignnone size-medium wp-image-1554" title="2 Web Parts in two Zones" src="http://www.novolocus.com/wp-content/uploads/2009/06/2-Web-Parts-in-two-Zones-300x102.PNG" alt="2 Web Parts in two Zones" width="300" height="102" /></a></p>
<p>Of course, the problem with this is that if you put two web parts in one zone you get something like the following:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/2-Web-Parts-in-one-Zone.PNG"><img class="alignnone size-medium wp-image-1555" title="2 Web Parts in one Zone" src="http://www.novolocus.com/wp-content/uploads/2009/06/2-Web-Parts-in-one-Zone-300x217.PNG" alt="2 Web Parts in one Zone" width="300" height="217" /></a></p>
<p>Actually, that can sometimes work quite well, but it&#8217;s something else to consider when you (or your users) are laying out their web parts. Still, it&#8217;s pretty easy &#8211; here are the image files used for the border (I put them into a folder in LAYOUTS):</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/Files-used.PNG"><img class="alignnone size-medium wp-image-1556" title="Files used" src="http://www.novolocus.com/wp-content/uploads/2009/06/Files-used-300x141.PNG" alt="Files used" width="300" height="141" /></a></p>
<p>I then put a whole bunch of DIV tags into my page for the borders. I don&#8217;t like having all of them, but it&#8217;s a fairly standard way of doing this (browsers &#8211; please support CSS for corner radius soon).</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/DIV-tags-for-corners.PNG"><img class="alignnone size-medium wp-image-1557" title="DIV tags for corners" src="http://www.novolocus.com/wp-content/uploads/2009/06/DIV-tags-for-corners-300x130.PNG" alt="DIV tags for corners" width="300" height="130" /></a></p>
<p>Yuck! Lots of DIVs, but combined with these CSS Styles &#8230;</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/Styles.PNG"><img class="alignnone size-medium wp-image-1558" title="Styles" src="http://www.novolocus.com/wp-content/uploads/2009/06/Styles-300x109.PNG" alt="Styles" width="300" height="109" /></a></p>
<p>&#8230; it puts our border around our web part zone. Obviously, for a real system you&#8217;d use a nice looking border &#8211; mine is for prototype only.</p>
<p>One issue that remains, though, is what happens if there are no web parts in the web part zone? Well, as it stands you&#8217;d have a nice empty box which would shrink to its minimum size, as there are not contents. This isn&#8217;t ideal &#8211; if it&#8217;s empty, we&#8217;d rather not see it at all. SharePoint seems to deal with this for square borders using the <a href="http://www.novolocus.com/2008/11/07/what-is-msolayouts_makeinvisibleifempty/">MSO_Layouts_MakeInvisibleIfEmpty() </a>Javascript function. JavaScript? Pah! Quaint and old school &#8211; I used a bit of jQuery:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/JQuery.PNG"><img class="alignnone size-medium wp-image-1559" title="JQuery" src="http://www.novolocus.com/wp-content/uploads/2009/06/JQuery-300x70.PNG" alt="JQuery" width="300" height="70" /></a></p>
<p>What this code does is get the innermost DIV tag of every bordered area. If that DIV tag doesn&#8217;t have any children, we find the first parent DIV tag at the &#8216;top&#8217; of my set of nested DIVs, and hide it! And that works nicely:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/No-Leftovers.PNG"><img class="alignnone size-medium wp-image-1560" title="No Leftovers" src="http://www.novolocus.com/wp-content/uploads/2009/06/No-Leftovers-300x139.PNG" alt="No Leftovers" width="300" height="139" /></a></p>
<p>Next up, <a href="http://www.novolocus.com/2009/06/30/rounded-corners-on-web-parts/">I&#8217;ll take a look at borders on web parts themselves</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2009/06/29/rounded-corners-on-web-part-zones/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Automatically add themes to the SPThemes.xml file</title>
		<link>http://www.novolocus.com/2009/06/25/automatically-add-themes-to-the-spthemes-xml-file/</link>
		<comments>http://www.novolocus.com/2009/06/25/automatically-add-themes-to-the-spthemes-xml-file/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 09:45:15 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[Features]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=1536</guid>
		<description><![CDATA[I&#8217;m not sure I&#8217;ll use themes again over the AlternateCssUrl again in a hurry, but I did decide to take a look at the 10 example themes Microsoft Released in March. I&#8217;ll blog about how they look &#8211; sometime! (The short answer &#8211; some good, some bad, some awful!)
Anyway, I was interested that the themes [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure I&#8217;ll use themes again over the<a href="http://www.novolocus.com/2008/11/10/where-to-put-css-when-branding/"> AlternateCssUrl </a>again in a hurry, but I did decide to take a look at the<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0A87658F-20B8-4DCC-AD7A-09AD22641F3A&amp;displaylang=en"> 10 example themes Microsoft Released in March</a>. I&#8217;ll blog about how they look &#8211; sometime! (The short answer &#8211; some good, some bad, some awful!)</p>
<p>Anyway, I was interested that the themes could all be activated as features. This rather kept with <a href="http://www.novolocus.com/2009/02/12/feature-stapling-for-branding/">my feeling on how branding</a> should be deployed.</p>
<p>However, some of the themes (though not all) were suddenly available in the &#8216;Site Themes&#8217; page of my SharePoint system. I knew from experience that this isn&#8217;t something that &#8216;just happens&#8217; &#8211; previously, I&#8217;ve done it by hand.</p>
<p><strong>EDIT: See the comments &#8211; they describe an possible pit fall, but both have articles about how to do the same thing&#8230;</strong><span id="more-1536"></span></p>
<p>I became curious, so I opened up Reflector. I found that there is a method called when the feature is installed to update the SPThemes.xml file:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/Add-Themes-Method.PNG"><img class="alignnone size-medium wp-image-1537" title="Add Themes Method" src="http://www.novolocus.com/wp-content/uploads/2009/06/Add-Themes-Method-300x220.PNG" alt="Add Themes Method" width="300" height="220" /></a></p>
<p>ModificationType is just a private enumeration to tell you whether you are adding or removing an entry from the SPThemes file. This code is called from within a <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfeaturereceiver.aspx">Feature Receiver</a> during  <span style="text-decoration: line-through;">FeatureActivated</span> <span style="text-decoration: line-through;">FeatureInstalling</span> (need to check, see comments below)</p>
<p>Anyway, I&#8217;ll remember this in case I should need to do similar. Obviously, the original code is probably simpler than the decompiled stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2009/06/25/automatically-add-themes-to-the-spthemes-xml-file/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using jQuery to fix the removal of the Title column of a list</title>
		<link>http://www.novolocus.com/2009/06/02/using-jquery-to-remove-the-title-of-a-list/</link>
		<comments>http://www.novolocus.com/2009/06/02/using-jquery-to-remove-the-title-of-a-list/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 12:20:52 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Breadcrumbs]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=1491</guid>
		<description><![CDATA[SharePoint List items all have a Title column (although it&#8217;s display name might be changed to something else). This Title column is a string, which is unfortunate as sometimes you really don&#8217;t need a string column on a list; this was the need I faced.
You can make a Title column not required:

Also, if you go [...]]]></description>
			<content:encoded><![CDATA[<p>SharePoint List items all have a <em>Title</em> column (although it&#8217;s display name might be changed to something else). This <em>Title</em> column is a string, which is unfortunate as sometimes you really don&#8217;t need a string column on a list; this was the need I faced.</p>
<p>You can make a <em>Title</em> column not required:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/turn-off-title-requirement.png"><img class="alignnone size-medium wp-image-1492" title="turn-off-title-requirement" src="http://www.novolocus.com/wp-content/uploads/2009/06/turn-off-title-requirement-300x205.png" alt="turn-off-title-requirement" width="300" height="205" /></a></p>
<p>Also, if you go to the &#8216;Advanced Settings&#8217; page of your list and &#8216;Allow management of Content Types&#8217; you can then go into your content types and <em>Hide</em> the <em>Title</em> column. This is okay &#8211; but the <em>Title</em> column is still there &#8211; it&#8217;s just being displayed with &#8220;(no title)&#8221;&#8230;<span id="more-1491"></span></p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/start.png"><img class="alignnone size-medium wp-image-1493" title="List View Showing Title" src="http://www.novolocus.com/wp-content/uploads/2009/06/start-300x71.png" alt="List View Showing Title" width="300" height="71" /></a></p>
<p>That&#8217;s not such a problem for views on a list &#8211; you can simply choose to not show the <em>Title</em> column. But unfortunately, some other pages (such as <em>EditForm.aspx</em> and <em>DispForm.aspx</em>) use the <em>Title</em> column in their title and navigation:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/original-edit-form.png"><img class="alignnone size-medium wp-image-1494" title="original-edit-form" src="http://www.novolocus.com/wp-content/uploads/2009/06/original-edit-form-300x113.png" alt="original-edit-form" width="300" height="113" /></a></p>
<p>&#8220;(no title)&#8221; sucks a bit, especially as we probably do have something better to use as a title. I decided to use jQuery to replace the &#8220;(no title)&#8221;s in the Edit and Display forms:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/code.png"><img class="alignnone size-medium wp-image-1495" title="code" src="http://www.novolocus.com/wp-content/uploads/2009/06/code-300x131.png" alt="code" width="300" height="131" /></a></p>
<p>Or, as text:</p>
<p><code>&lt;script language="javascript" type="text/javascript"&gt;<br />
$(document).ready(function() {<br />
var user = $("span[class='ms-entity-resolved'] &gt; span[id='content']");<br />
var userText = user.text();<br />
document.title = "Users - " + userText;<br />
var pageTitle = $("h2[class='ms-pagetitle']");<br />
var pageTitleHtml = pageTitle.html();<br />
pageTitle.html(pageTitleHtml.replace("(no title)",userText));<br />
var pageLink = $("td[class='ms-titlearea']");<br />
var pageLinkHtml = pageLink.html();<br />
pageLink.html(pageLinkHtml.replace("(no title)",userText));<br />
});<br />
&lt;/script&gt;</code></p>
<p>Here I&#8217;m getting the new title from my user field &#8211; but you might want to use another field. Whatever, the same principle of using jQuery to get the value would work.</p>
<p>Then I update the Browser&#8217;s title bar with the new title.</p>
<p>Next, I select the page title and replace &#8220;(no title)&#8221; with my new title, before writing the html back, and finally I repeat this with the &#8220;(no title)&#8221; link in the breadcrumb. The end result is:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/modified-edit-form.png"><img class="alignnone size-medium wp-image-1496" title="modified-edit-form" src="http://www.novolocus.com/wp-content/uploads/2009/06/modified-edit-form-300x114.png" alt="modified-edit-form" width="300" height="114" /></a></p>
<p>Nice. I repeated this for my <em>Dispform.aspx</em> too, though not the new Item form &#8211; it doesn&#8217;t display the title at all (as a new item doesn&#8217;t have one yet!) I also added an edit button to my list so that users can still edit these items:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/06/modified-list-view.png"><img class="alignnone size-medium wp-image-1497" title="modified-list-view" src="http://www.novolocus.com/wp-content/uploads/2009/06/modified-list-view-300x67.png" alt="modified-list-view" width="300" height="67" /></a></p>
<p>(And yes, there are other ways of dealing with this &#8211; building  proper custom edit and display forms, for example &#8211; but this is quite low effort)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2009/06/02/using-jquery-to-remove-the-title-of-a-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Putting actions into the PlaceHolderLeftActions</title>
		<link>http://www.novolocus.com/2009/04/17/putting-actions-into-the-placeholderleftactions/</link>
		<comments>http://www.novolocus.com/2009/04/17/putting-actions-into-the-placeholderleftactions/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 14:00:53 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Placeholders]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=1256</guid>
		<description><![CDATA[The Wiki and Blog sites have pages that make use of the PlaceHolderLeftActions content placeholder. I&#8217;ve mentioned this before regarding putting a web part zone below the quick launch menu. This time I wanted to list some actions for our &#8216;case&#8217; system.

The code to do this? Not very hard. Naturally, we&#8217;ll actually have some code [...]]]></description>
			<content:encoded><![CDATA[<p>The Wiki and Blog sites have pages that make use of the PlaceHolderLeftActions content placeholder. I&#8217;ve mentioned this before regarding <a href="http://www.novolocus.com/2008/10/28/putting-a-web-part-zone-below-the-quick-navigation-menu/">putting a web part zone below the quick launch menu</a>. This time I wanted to list some actions for our &#8216;case&#8217; system.</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/04/placeholderleftnavactions.png"><img class="alignnone size-medium wp-image-1259" title="placeholderleftnavactions" src="http://www.novolocus.com/wp-content/uploads/2009/04/placeholderleftnavactions-227x300.png" alt="placeholderleftnavactions" width="227" height="300" /></a></p>
<p>The code to do this? Not very hard. Naturally, we&#8217;ll actually have some code to generate our actions and links&#8230;</p>
<p><code>&lt;asp:Content ContentPlaceHolderId="PlaceHolderLeftActions" runat="server"&gt;<br />
&lt;DIV class="ms-quicklaunchouter"&gt;<br />
&lt;DIV class="ms-quickLaunch" style="WIDTH: 100%"&gt;<br />
&lt;DIV class="ms-quicklaunchheader"&gt;Case Actions&lt;/DIV&gt;<br />
&lt;div&gt;<br />
&lt;TABLE class="ms-navitem" cellSpacing="0" cellPadding="0" width="100%" border="0"&gt;<br />
&lt;TR&gt;&lt;TD style="WIDTH: 100%"&gt;<br />
&lt;A class="ms-navitem" href="http://vm-moss/Default.aspx"&gt;Action 1&lt;/A&gt;<br />
&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;<br />
&lt;TABLE class="ms-navitem" cellSpacing="0" cellPadding="0" width="100%" border="0"&gt;<br />
&lt;TR&gt;&lt;TD style="WIDTH: 100%"&gt;<br />
&lt;A class="ms-navitem" href="http://vm-moss/Default.aspx"&gt;Action 2&lt;/A&gt;<br />
&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;<br />
&lt;/div&gt;<br />
&lt;/DIV&gt;<br />
&lt;/DIV&gt;<br />
&lt;/asp:Content&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2009/04/17/putting-actions-into-the-placeholderleftactions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What do out-of-box pages do with their Breadcrumbs?</title>
		<link>http://www.novolocus.com/2009/04/01/what-do-out-of-box-pages-do-with-their-breadcrumbs/</link>
		<comments>http://www.novolocus.com/2009/04/01/what-do-out-of-box-pages-do-with-their-breadcrumbs/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 16:52:27 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Breadcrumbs]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=1210</guid>
		<description><![CDATA[As I&#8217;ve described before (and repeatedly bemoaned!) some page layouts hide the page level breadcrumb and display their own. Worse &#8211; they don&#8217;t all do this in the same way! All of this continues to feed my idea that you shouldn&#8217;t use any of the OOB publishing sites if you can help it.
However, sometimes we [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve described before (and repeatedly bemoaned!) <a href="http://www.novolocus.com/2008/02/22/more-sharepoint-breadcrumb-wtf/">some page layouts hide the page level breadcrumb and display their own</a>. Worse &#8211; they don&#8217;t all do this in the same way! All of this continues to feed my idea that you<a href="http://www.novolocus.com/2009/03/02/pla-your-publishing-pages/"> shouldn&#8217;t use any of the OOB publishing sites if you can help it</a>.</p>
<p>However, sometimes we don&#8217;t have that luxury (i.e. I&#8217;ve never had that option) &#8211; so what do those crazy out-of-the-box page layouts do with their breadcrumbs? Well, Martijn Molegraaf has been <a href="http://martijnmolegraaf.blogspot.com/2009/01/sharepoint-breadcrumb-ignore-page-level.html">kind enough to provide a chart</a>. Nice one. And I feel your pain.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2009/04/01/what-do-out-of-box-pages-do-with-their-breadcrumbs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Out-of-Box Publishing Page layouts suck too</title>
		<link>http://www.novolocus.com/2009/03/31/out-of-box-publishing-page-layouts-suck-too/</link>
		<comments>http://www.novolocus.com/2009/03/31/out-of-box-publishing-page-layouts-suck-too/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 19:00:35 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[Content Editor]]></category>
		<category><![CDATA[Page Layouts]]></category>
		<category><![CDATA[RadEditor]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=1205</guid>
		<description><![CDATA[So, might not be news, but SharePoint&#8217;s out of box Page Layouts suck. I&#8217;ve already described how the page layouts have an image on branding, introducing styles to change the navigation, etc.. This has led me to the conclusion that you shouldn&#8217;t use the out-of-box publishing sites &#8211; start from a minimal publishing site, and [...]]]></description>
			<content:encoded><![CDATA[<p>So, might not be news, but SharePoint&#8217;s out of box Page Layouts suck. I&#8217;ve already described how the <a href="http://www.novolocus.com/2008/04/03/pimp-my-sharepoint-part-ii-beyond-just-colours/">page layouts have an image on branding</a>, introducing styles to change the navigation, etc.. This has led me to the conclusion that you shouldn&#8217;t use the out-of-box publishing sites &#8211; <a href="http://www.novolocus.com/2009/03/02/pla-your-publishing-pages/">start from a minimal publishing site</a>, and build from the ground up.</p>
<p>But what of customers who have naively thought that, I don&#8217;t know, a Collaboration Site Template might be a good template to use for the collaboration site? Well, this is the problem I&#8217;ve got now; a customer has used the out-of-box page layouts extensively, and <em>now</em> wants the styles of the text and so on to be consistent. How can I do that? <span id="more-1205"></span>Well, that&#8217;s where things get tricky. For Page Editor controls in some page layouts they are within a &lt;div&gt; tag using the <em>PageContent</em> style. This is true for the Article Page page layouts, and some of the Welcome Page layouts:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/03/article-page.png"><img class="alignnone size-medium wp-image-1206" title="article-page" src="http://www.novolocus.com/wp-content/uploads/2009/03/article-page-300x65.png" alt="article-page" width="300" height="65" /></a></p>
<p>Yup, that grey text in Tahoma font is actually defined by the CSS class of the enclosing &lt;div&gt; tag. But here&#8217;s the problem. Some of the other page layouts don&#8217;t have the &lt;div&gt; tag and <em>PageContent </em>CSS style. There is little we can do about all of them, other than adding the &lt;div&gt; tag onto the remaining Page Layouts; we could try changing styles further up the structure of the page, but that could change a lot more too &#8211; and my customer isn&#8217;t ready to embark on a full rebranding.</p>
<p>To make matters worse, they have some custom page layouts which use the Telerik RadEditor control. Now, this is fine in Display Mode, but in Edit Mode the RadEditor puts the text to be edited into an IFRAME &#8211; which is now out of the styling scope of the enclosing &lt;div&gt; tag! Display view &#8211; grey Tahoma text. Edit view &#8211; black Times New Roman!</p>
<p>So, how did I deal with that? Well, in the CSS file that defines the styles for the RadEditor (I&#8217;d created one and configured the RadEditor to use it) I defined a &lt;body&gt; tag with a style that matched the style of the surround &lt;div&gt; tag. It&#8217;s a bit of a hack, but at least it did make the text appear the same in Edit and Display modes.</p>
<p>Why so much harder than it should be, though? Couldn&#8217;t the page layouts have been consistent? What&#8217;s with all the rubbish page layouts anyway? Only the Article Page layouts make sense!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2009/03/31/out-of-box-publishing-page-layouts-suck-too/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint Designer &#8211; grrr&#8230;.</title>
		<link>http://www.novolocus.com/2009/03/20/sharepoint-designer-grrr/</link>
		<comments>http://www.novolocus.com/2009/03/20/sharepoint-designer-grrr/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 17:18:18 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[SharePoint Designer]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=1182</guid>
		<description><![CDATA[SharePoint designer is so like a wife &#8211; I love it to bits, sometimes I hate it, and I fervently hope for a cuter version in the future! No, I&#8217;m kidding.
But SPD currently has this persistence in adding a &#38;nbsp; in front of my page&#8217;s title field. I don&#8217;t need that non-breaking space. I don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>SharePoint designer is so like a wife &#8211; I love it to bits, sometimes I hate it, and I fervently hope for a cuter version in the future! No, I&#8217;m kidding.</p>
<p>But SPD currently has this persistence in adding a &amp;nbsp; in front of my page&#8217;s title field. I don&#8217;t need that non-breaking space. I don&#8217;t want that non-breaking space. But I keep deleting it, and Designer keeps adding it back in.</p>
<p>For me, it&#8217;s a sign one of the two big problems with SharePoint Designer &#8211; robustness. When I&#8217;m in Visual Studio, I&#8217;m comfortable; it&#8217;s pretty reliable, normally, and behaves in ways I understand. Even the things that can blow it up are pretty well understood. Much as I hate to admit it, I do think that the reason that C# won out over Java was simpler, robust tooling &#8211; Visual Studio.</p>
<p>However, with SharePoint designer all sorts of weird stuff happens&#8230;<span id="more-1182"></span></p>
<ul>
<li>These bloody &amp;nbsp; character that keep appearing</li>
<li>Spurious and apparently random errors from the Dataview web part &#8211; sometimes&#8230;</li>
<li>The &#8216;Select Data Source&#8217; dialog rendering sometimes failing</li>
<li>The fact that I have to try twice to get into the _<em>catalogs </em>folder when I open a site &#8211; though in fairness, that could just be SharePoint&#8230;</li>
<li>Inserting Web parts is sometimes available &#8211; and sometimes not. And Lord help you if you want to insert one into the code view.</li>
<li>Randomly losing connectivity to Servers that I know are available.</li>
<li>Falling over all the time.</li>
</ul>
<p>SharePoint 14 is, I hope, going to be an &#8216;evolutionary&#8217; step &#8211; or put another way, a few extra features hiding the world&#8217;s largest service pack! I do hope that the plan is to do the same with Designer. It feels very powerful, but very&#8230; version 1.</p>
<p>The other problem with designer, as I see it, is complexity. It&#8217;s pretty much as complex as Visual Studio &#8211; but it&#8217;s supposed to be the lightweight &#8216;business user&#8217; tool. I mean yes, what that business user is up to can be pretty complex too. But would a lightweight &#8216;workflow designer&#8217; not be good as another tool? How about making the &#8216;New Page&#8217; dialogs a bit more&#8230; SharePoint? I mean, creating Standard ASP.Master pages &#8211; but for SharePoint? It is <em><strong>SharePoint</strong> </em>Designer, right? CSS page layouts? Very cool, shame the team building designer didn&#8217;t meet the team who built SharePoint&#8217;s pages &#8211; &#8216;cos they&#8217;re not the most useful in SharePoint. Web components &#8211; FrontPage Extensions relic. This list goes on.</p>
<p>Now, I realise that SharePoint Designer won&#8217;t ever be as simple as, say, NotePad (thankfully it&#8217;s a bit more feature rich). But what would be good for the next version is that, if this is to be <em>SharePoint </em>Designer, could someone please strip out all of the stuff that isn&#8217;t about SharePoint? FTP settings! And rethink the dialogs? And make the Accessibility checker work (I think if that worked it would be fantastic!)</p>
<p>Oh well, I live in hope. A bit of a rant, I know, and I both see the point of Designer, and think it has great potential &#8211; but I reckon it&#8217;s still showing it&#8217;s Frontpage heritage</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2009/03/20/sharepoint-designer-grrr/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Deploy Publishing Pages and Content Types as a feature</title>
		<link>http://www.novolocus.com/2009/03/13/deploy-publishing-pages-and-content-types-as-a-feature/</link>
		<comments>http://www.novolocus.com/2009/03/13/deploy-publishing-pages-and-content-types-as-a-feature/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 12:58:40 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Content Type]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[Page Layouts]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=1175</guid>
		<description><![CDATA[Aka &#8220;CAML is the bastard spawn of Satan&#8221;.
So, I&#8217;m writing a site definition to create a Publishing site. This is a bit of a first for me. One of the things I want to do is deploy a new Publishing Page Content type, and associate some layouts with it.
I started by following Andrew Connell&#8217;s instructions [...]]]></description>
			<content:encoded><![CDATA[<p><em>Aka &#8220;CAML is the bastard spawn of Satan&#8221;.</em></p>
<p>So, I&#8217;m writing a site definition to create a Publishing site. This is a bit of a first for me. One of the things I want to do is deploy a new Publishing Page Content type, and associate some layouts with it.</p>
<p>I started by following Andrew Connell&#8217;s instructions for a Minimal Site Definition (<a href="http://www.amazon.co.uk/Professional-SharePoint-Content-Management-Development/dp/0470224754/ref=cm_cr_pr_product_top">as in his book</a>). This all seemed to go pretty well; testing created a new, minimal site.</p>
<p>Next up I wanted to deploy the Content Type and associated page layouts. Well, there wasn&#8217;t much information in his book on this &#8211; like him, I&#8217;d figured I&#8217;d write a separate Feature for deploying just the content type and page layouts &#8211; but there was very little information in his book about this.<span id="more-1175"></span></p>
<p>My first efforts were pretty unsuccessful. I used <a href="http://www.andrewconnell.com/blog/articles/MossStsadmWcmCommands.aspx">his STSADM commands</a> to pull the content type I wanted to use out of SharePoint as CAML, and wrote the feature to deploy that content type and my page layout files. However, when I activated the feature, if I went to the &#8216;Create New Page&#8217; page or the &#8216;Site Content Types&#8217; page my CPU usage went to 100% and sat there. Looked like it was an infinite loop.</p>
<p>&#8220;Hmm. Something wrong with the Content Type&#8221; I thought &#8211; but could I see what was wrong? My first thought was that it was the presence of the fields defined by the parent <em>Page </em>content type, but fixing that still resulted in nothing. Eventually, after a couple of hours of experimentation and trawling of the web, I found <a href="http://stackoverflow.com/questions/539328/high-cpu-usage-when-deploying-content-types-via-a-sharepoint-feature">this explanation</a>.</p>
<blockquote><p>the XML generated does not contain the XML Namespace: Also note that this tool doesn&#8217;t create XML that is 100% correct for use in a Feature.</p></blockquote>
<p>Thanks Daniel Pollard, good to know. Added my NamespaceURL as shown below, and my content type deployed correctly, without high CPU usage.</p>
<p><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;<br />
&lt;Elements xmlns="<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>"&gt;<br />
&lt;ContentType ID="[Long Content Type ID]" Name="Andy's Page" Description="A Page For Andy" Group="Andy's Types"&gt;<br />
&lt;FieldRefs&gt;<br />
&lt;FieldRef ID="f55c4d88-1f2e-4ad9-aaa8-819af4ee7ee8" Name="PublishingPageContent" /&gt;<br />
&lt;/FieldRefs&gt;<br />
&lt;DocumentTemplate TargetName="/_layouts/CreatePage.aspx" /&gt;<br />
&lt;XmlDocuments&gt;<br />
&lt;XmlDocument NamespaceURI="<a href="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">http://schemas.microsoft.com/sharepoint/v3/contenttype/forms</a>"&gt;<br />
&lt;FormTemplates xmlns="<a href="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">http://schemas.microsoft.com/sharepoint/v3/contenttype/forms</a>"&gt;<br />
&lt;Display&gt;DocumentLibraryForm&lt;/Display&gt;<br />
&lt;Edit&gt;DocumentLibraryForm&lt;/Edit&gt;<br />
&lt;New&gt;DocumentLibraryForm&lt;/New&gt;<br />
&lt;/FormTemplates&gt;<br />
&lt;/XmlDocument&gt;<br />
&lt;/XmlDocuments&gt;<br />
&lt;/ContentType&gt;<br />
&lt;/Elements&gt;</code></p>
<p>Of course, it then occurred to me that I probably didn&#8217;t need the XMLDocuments section. So I deleted it:</p>
<p><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;<br />
&lt;Elements xmlns="<a href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</a>"&gt;<br />
&lt;ContentType ID="[Long Content Type ID]" Name="Andy's Page" Description="A Page For Andy" Group="Andy's Types"&gt;<br />
&lt;FieldRefs&gt;<br />
&lt;FieldRef ID="f55c4d88-1f2e-4ad9-aaa8-819af4ee7ee8" Name="PublishingPageContent" /&gt;<br />
&lt;/FieldRefs&gt;<br />
&lt;DocumentTemplate TargetName="/_layouts/CreatePage.aspx" /&gt;<br />
&lt;/ContentType&gt;<br />
&lt;/Elements&gt;</code></p>
<p>Reams of CAML cut down to a few lines. Next time, I&#8217;m just writing all this by hand.</p>
<p>Anyway, the content type was going in alright, but my page layouts were not attached to it. I couldn&#8217;t find any documentation about that either in MSDN. Then I found a useful article by Josh Carlisle trying to so what I was doing -<a href="http://www.sharepointbrainfreeze.com/archive/2007/11/27/creating-a-default-custom-moss-publishing-page-feature.aspx"> deploy a content type and a page layout</a>. Ah-ha! <em>PublishingAssociatedContentType</em> looks promising. Indeed Chris O&#8217;Brien has <a href="http://www.sharepointnutsandbolts.com/2007/04/deploying-master-pages-and-page-layouts.html">a good description of the fields</a> of this too.</p>
<p><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;<br />
&lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt;<br />
&lt;Module Name="LayoutPreviews" Url="_catalogs/masterpage/$Resources:core,Culture;/Preview Images" RootWebOnly="True" Path="PageLayoutPreviews"&gt;<br />
&lt;File Url="Andys.png" IgnoreIfAlreadyExists="TRUE" Type="GhostableInLibrary"&gt;&lt;/File&gt;<br />
&lt;/Module&gt;<br />
&lt;Module Name="Layouts" Url="_catalogs/masterpage" RootWebOnly="True" Path="PageLayouts"&gt;<br />
&lt;File Url="AndysLayout.aspx" IgnoreIfAlreadyExists="TRUE" Type="GhostableInLibrary"&gt;<br />
&lt;Property Name="Title" Value="Andys Layout" /&gt;<br />
&lt;Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" /&gt;<br />
&lt;Property Name="PublishingAssociatedContentType" Value=";#Andy's Page;#[Long Content Type ID];#" /&gt;<br />
&lt;Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/Andys.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/Andys.png" /&gt;<br />
&lt;/File&gt;<br />
&lt;/Module&gt;<br />
&lt;/Elements&gt;</code></p>
<p>That seems to work nicely &#8211; it deploys the page layout, gives it a friendly name and preview image, and hooks it up to the content type. <strong>Note</strong>: the<em> Content Type</em> property is <span style="text-decoration: underline;">not </span>the SharePoint Content type, but some text saying that this file is a page layout. See the resources for CMSCore to see the exact text.</p>
<p>So, what did I make of this experience? Well, lot&#8217;s of CAML &#8211; which is virtually some obscure dead language spoken by a strange tribe lost in the artic wilderness. I actually think it might&#8217;ve been easier to write C# code to do all this set up. Anyway, it does appear that blogs are better than <a href="http://msdn.microsoft.com/en-us/library/ms462365.aspx">Microsoft&#8217;s documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2009/03/13/deploy-publishing-pages-and-content-types-as-a-feature/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What&#8217;s wrong with SharePoint Branding?</title>
		<link>http://www.novolocus.com/2009/03/07/whats-wrong-with-sharepoint-branding/</link>
		<comments>http://www.novolocus.com/2009/03/07/whats-wrong-with-sharepoint-branding/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 11:20:49 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=1141</guid>
		<description><![CDATA[Joel Oleson asks an interesting question:
Why don&#8217;t we have a community around our masterpages and themes?
It&#8217;s a good question. I can download a million and one Wordpress themes, but very few SharePoint ones. Why? Well, I like to answer a question with another question, so here&#8217;s a few:

What&#8217;s the market? Who want&#8217;s &#8216;em? Well, amongst [...]]]></description>
			<content:encoded><![CDATA[<p>Joel Oleson <a href="http://www.sharepointjoel.com/Lists/Posts/Post.aspx?List=0cd1a63d-183c-4fc2-8320-ba5369008acb&amp;ID=185">asks an interesting question</a>:</p>
<blockquote><p>Why don&#8217;t we have a community around our masterpages and themes?</p></blockquote>
<p>It&#8217;s a good question. I can download a million and one Wordpress themes, but very few SharePoint ones. Why? Well, I like to answer a question with another question, so here&#8217;s a few:</p>
<ul>
<li><strong>What&#8217;s the market? </strong>Who want&#8217;s &#8216;em? Well, amongst our customers, corporates mainly. These are the chaps who have expensively developed corporate brands. Off-the-shelf brands and themes aren&#8217;t going to meet their expectations.</li>
<li><strong>Are there small organisations? </strong>How many small/non-corportate SharePoint systems are there? The reason so many Wordpress themes get written is that there are a lot of WordPress bloggers out there, and lots of hobbyists. How many SharePoint ones are there? Yes, WSS3 is inexpensive &#8211; but to work with it, you&#8217;re raising the bar on technical expertise requirements. Most blogging plaforms &#8211; simple. SharePoint &#8211; colossal. And SharePoint Designer costs money &#8211; most of the other&#8217;s need NotePad, or have a built in editor. Once you&#8217;ve started to get into spending money like that, either companies go with the out of the box branding (&#8220;we just want the functionality&#8221;) or pay (&#8220;it must be our brand&#8221;).</li>
<li><strong>Why is it so freakin&#8217; complex?</strong> Core .css is 81Kb and 4350 lines long. That&#8217;s before you start looking at the other CSS files that you typically need to change &#8211; like Controls.css, Calendar.css, Portal.css, DatePicker.css, the HTML editor ones, the menus &#8230; ! My styles directory holds 220Kb&#8217;s of CSS! Compare that to a WordPress blog. I get why designers and hobbyists build WordPress themes &#8211; but what sort of masochist is going to write a SharePoint one <em>for fun</em>?</li>
<li><strong>Which Master Page?</strong> The Default Master? What about the Meeting Workspace Master? And, not wanting to scare anyone, but Application.master and Simple.master, which you can&#8217;t change (but can redirect &#8211; with code). And your users <span style="text-decoration: underline;">will</span> see pages that use the Application.master &#8211; document upload, recycle bin, viewing all site contents. So a &#8216;new master page&#8217; is not just one, it&#8217;s many, and it takes technical cleverness to replace some of the master pages involved. Most designers are into technical cleverness &#8211; nor should they be, it ain&#8217;t there job.</li>
<li><strong>Themes?</strong> Themes are good, but limited &#8211; there&#8217;s no out-of-box way to apply them to a hierarchy of sites, and they can&#8217;t make major structural changes to pages. Sure, they can be used sometimes, but again, takes technical expertise. And they don&#8217;t style the Date Picker; for some obscure  reason, it&#8217;s not coded to support themes.</li>
</ul>
<p>So, I guess in summary, it&#8217;s too complex for the typical design crowd, and way beyond the general Web Dev hobbyist community. Most of the designers who can do this sort of work are already doing so &#8211; for large companies who pay to have <em>their</em> brand, and don&#8217;t want an off the shelf one. I mean, I reckon I can rebrand a SharePoint site pretty completely &#8211; though I&#8217;ve never tried My Sites (another complexity!), and by the time I&#8217;ve done the images, the styles, changes to the master pages, tested it all, wrapped in a feature, you&#8217;re looking at, well, days, probably more than a man week, for someone who knows what they&#8217;re doing, isn&#8217;t aiming for accessibility, and is clear about their objective.</p>
<p>All in all, it&#8217;s harder than it oughta be.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2009/03/07/whats-wrong-with-sharepoint-branding/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Style individual web parts</title>
		<link>http://www.novolocus.com/2009/02/25/style-individual-web-parts/</link>
		<comments>http://www.novolocus.com/2009/02/25/style-individual-web-parts/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 11:33:15 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Parts]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=1062</guid>
		<description><![CDATA[Like Heather Solomon, I&#8217;m sometimes asked about styling individual web parts differently to the rest. I didn&#8217;t know of any way of doing this; instead, we&#8217;d typically style particular web part zones differently, but this meant that all web parts in that area looked differently.
Well,  Heather has now posted &#8216;Controling single web parts with CSS&#8216;. [...]]]></description>
			<content:encoded><![CDATA[<p>Like Heather Solomon, I&#8217;m sometimes asked about styling individual web parts differently to the rest. I didn&#8217;t know of any way of doing this; instead, we&#8217;d typically style particular web part zones differently, but this meant that all web parts in that area looked differently.</p>
<p>Well,  Heather has now posted &#8216;<a href="http://www.heathersolomon.com/blog/articles/Controlling-Single-Web-Parts-with-CSS.aspx">Controling single web parts with CSS</a>&#8216;. Neat. I didn&#8217;t know you could do that attribute selection.</p>
<p>The downer about this technique is that you have to set a DOCTYPE &#8211; and I can see that causing all sorts of grief as stuff breaks&#8230; &#8230;so it&#8217;s probably not something you&#8217;d do unless you&#8217;re building reasonably custom master page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2009/02/25/style-individual-web-parts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Feature Stapling for Branding</title>
		<link>http://www.novolocus.com/2009/02/12/feature-stapling-for-branding/</link>
		<comments>http://www.novolocus.com/2009/02/12/feature-stapling-for-branding/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 13:59:00 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Features]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=1023</guid>
		<description><![CDATA[As I&#8217;ve mentioned before, I reckon that from now on I&#8217;ll do all SharePoint branding through features alone &#8211; not using themes or the &#8216;choose master page&#8217; page. Which is fine, and useful too &#8211; one of the questions that has been raised recently is how to automatically apply the branding when a new site [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve mentioned before, I reckon that from now on I&#8217;ll do all SharePoint branding through features alone &#8211; <a href="http://www.novolocus.com/2008/11/10/where-to-put-css-when-branding/">not using themes</a> or the <a href="http://www.novolocus.com/2008/10/30/feature-receiver-to-apply-master-pages/">&#8216;choose master page&#8217; page</a>. Which is fine, and useful too &#8211; one of the questions that has been raised recently is how to automatically apply the branding when a new site is provided. Well, feature stapling  is the way to do that.</p>
<p>For those who don&#8217;t know, feature stapling is creating a feature which associates another feature with a Site Definition. When a site is provided by that site template the associated feature is activated. So, for example, we might have a <em>BrandingFeature </em>feature, which does all of our setting alternate CSS, setting master pages, etc., and then use a <em>BrandingStapler </em>feature to associate that with some (or all) of our site definitions.</p>
<p>I won&#8217;t bother repeating the &#8216;how to&#8217; of it, as there are <a href="http://grahamsibley.typepad.com/thoughtfactory/2007/06/automatically_a.html">plenty of good</a> <a href="http://www.grahamzero.com/blog/2008/05/dynamic-staplin.html">posts about it</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2009/02/12/feature-stapling-for-branding/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Build page layouts without Breadcrumbs or a Title</title>
		<link>http://www.novolocus.com/2009/01/22/build-page-layouts-without-breadcrumbs-or-a-title/</link>
		<comments>http://www.novolocus.com/2009/01/22/build-page-layouts-without-breadcrumbs-or-a-title/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 17:19:22 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[Breadcrumbs]]></category>
		<category><![CDATA[Page Layouts]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=997</guid>
		<description><![CDATA[Right, so SharePoint uses pages and page layouts &#8211; I won&#8217;t talk about the different types, but ask a couple of questions that&#8217;ve come up a few times.

If I create a new page layout in SharePoint, how do I get rid of the breadcrumbs?
How can I get breadcrumbs, but like the home page?

Here&#8217;s how&#8230;
Some page [...]]]></description>
			<content:encoded><![CDATA[<p>Right, so SharePoint uses pages and page layouts &#8211; I won&#8217;t talk about the different types, but ask a couple of questions that&#8217;ve come up a few times.</p>
<ul>
<li>If I create a new page layout in SharePoint, how do I get rid of the breadcrumbs?</li>
<li>How can I get breadcrumbs, but like the home page?</li>
</ul>
<p>Here&#8217;s how&#8230;<span id="more-997"></span></p>
<p>Some page layouts don&#8217;t have space above the main content for a title, or for breadcrumbs.</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/01/no-breadcrumbs-oob.png"><img class="alignnone size-medium wp-image-998" title="Out-of-box page with no title or breadcrumbs above the main content" src="http://www.novolocus.com/wp-content/uploads/2009/01/no-breadcrumbs-oob-300x94.png" alt="" width="300" height="94" /></a></p>
<p>By contrast, a lot of other pages do:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/01/with-breadcrumbs-oob-page-layout.png"><img class="alignnone size-medium wp-image-999" title="Out-of-box page layout with title and breadcrumbs" src="http://www.novolocus.com/wp-content/uploads/2009/01/with-breadcrumbs-oob-page-layout-300x79.png" alt="" width="300" height="79" /></a></p>
<p>So what happens when we create a new page layout in SharePoint Designer? Well, they have breadcrumbs, and room for a title:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/01/new-page-layout-in-ie.png"><img class="alignnone size-medium wp-image-1000" title="New Page Layout showing space for title, and breadcrumbs" src="http://www.novolocus.com/wp-content/uploads/2009/01/new-page-layout-in-ie-300x155.png" alt="" width="300" height="155" /></a></p>
<p>So, how do I fix that? Well, go back to SharePoint Designer (you just created the page layout with it, right?) Let&#8217;s look at the code:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/01/new-page-layout.png"><img class="alignnone size-medium wp-image-1001" title="New Page Layout in SharePoint Designer" src="http://www.novolocus.com/wp-content/uploads/2009/01/new-page-layout-300x258.png" alt="" width="300" height="258" /></a></p>
<p>Right, pretty straight forward &#8211; some content controls overriding the master page&#8217;s content placeholders. I&#8217;m assuming that you&#8217;re familiar with Master Pages in ASP.NET. Now, we can get rid of the breadcrumbs, title and the page image (which is sometimes shown on the left) by overriding those content controls. Paste this code into your page:</p>
<p><code>&lt;asp:Content ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" /&gt;<br />
&lt;asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server"&gt;&lt;IMG SRC="/_layouts/images/blank.gif" width=1 height=1 alt=""&gt;&lt;/asp:Content&gt;<br />
&lt;asp:Content ContentPlaceHolderId="PlaceHolderTitleBreadcrumb" runat="server"/&gt;</code></p>
<p>What we&#8217;re doing there is setting those to empty content (or, for the Page image, an invisible 1 pixel image. No, I don&#8217;t know why, but that seems to be how SharePoint always does it)</p>
<p>Fine, what does this give?<br />
<a href="http://www.novolocus.com/wp-content/uploads/2009/01/new-page-no-breadcrumbs-or-title.png"><img class="alignnone size-medium wp-image-1002" title="new-page-no-breadcrumbs-or-title" src="http://www.novolocus.com/wp-content/uploads/2009/01/new-page-no-breadcrumbs-or-title-300x132.png" alt="" width="300" height="132" /></a></p>
<p>No breadcrumbs or title, but still a big gap. How do we get rid of that? Well, we can use CSS to shrink the gap. This CSS is inserted into the <strong>PlaceHolderAdditionalPageHead</strong></p>
<p><code>&lt;asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server"&gt;<br />
&lt;style&gt;<br />
TD.ms-titleareaframe, .ms-pagetitleareaframe { height: 10px; }<br />
Div.ms-titleareaframe { height: 100%;}<br />
.ms-pagetitleareaframe table { background: none; height: 10px; }<br />
&lt;/style&gt;<br />
&lt;/asp:Content&gt;</code></p>
<p>This CSS gets inserted in the header, and it&#8217;s just setting the height of that region to 10 pixels or so. Now we get:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/01/new-page-no-gap-at-top.png"><img class="alignnone size-medium wp-image-1003" title="new-page-no-gap-at-top" src="http://www.novolocus.com/wp-content/uploads/2009/01/new-page-no-gap-at-top-300x94.png" alt="" width="300" height="94" /></a></p>
<p>Hmm. Nearly there &#8211; but the border isn&#8217;t right. There should be a 1pixel blue border at the top and left of the main content area. How does SharePoint normally do that?</p>
<p>Well, it cheats. The blue border comes from a table that is put into the main content area, and is set to fill the content area. For an example, put this code into your main content area:</p>
<p><code>&lt;table style="padding-top:0px;" border="0" cellpadding="0" cellspacing="0" ID="OuterZoneTable" width="100%"&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;<br />
Test Content<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;</code></p>
<p>It shows:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/01/new-page-looking-correct.png"><img class="alignnone size-medium wp-image-1004" title="new-page-looking-correct" src="http://www.novolocus.com/wp-content/uploads/2009/01/new-page-looking-correct-300x114.png" alt="" width="300" height="114" /></a></p>
<p>Now you can change this table to show the content you want!</p>
<p><strong>What if I want the breadcrumb in the main content area?</strong> Sort of like the home page to a collaboration site? Or even a team site?</p>
<p>Well, there are a couple of more steps. First off, replace the text you just put into your main content area with this:</p>
<p><code>&lt;table style="padding-top:0px;" border="0" cellpadding="0" cellspacing="0" ID="OuterZoneTable" width="100%"&gt;<br />
&lt;tr&gt;<br />
&lt;td class="ms-pagebreadcrumb"&gt;<br />
&lt;asp:SiteMapPath ID="ContentMap" Runat="server" SiteMapProvider="CurrentNavSiteMapProviderNoEncode" RenderCurrentNodeAsLink="false" SkipLinkText="" NodeStyle-CssClass="ms-sitemapdirectional"/&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;<br />
Test Content<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;</code></p>
<p>This will show:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/01/breadcrumb-added-but-padded-within-the-page.png"><img class="alignnone size-medium wp-image-1005" title="breadcrumb-added-but-padded-within-the-page" src="http://www.novolocus.com/wp-content/uploads/2009/01/breadcrumb-added-but-padded-within-the-page-300x115.png" alt="" width="300" height="115" /></a></p>
<p>Nearly, but not quite. The breadcrumb is there, and styled right, but it is padded in from the edge of the page.</p>
<p>To get rid of the padding, we have to insert CSS content into another content placeholder. Add this to your page:</p>
<p><code>&lt;asp:Content ContentPlaceHolderId="PlaceHolderBodyAreaClass" runat="server"&gt;<br />
&lt;style type="text/css"&gt;<br />
.ms-bodyareaframe { padding: 0px; }<br />
&lt;/style&gt;<br />
&lt;/asp:Content&gt;</code></p>
<p>And this produces:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2009/01/completed-page.png"><img class="alignnone size-medium wp-image-1006" title="completed-page" src="http://www.novolocus.com/wp-content/uploads/2009/01/completed-page-300x68.png" alt="" width="300" height="68" /></a></p>
<p>A completed page, with the breadcrumb in the main content area, and no title breadcrumb or title. Sure, I&#8217;ll have to build some padding into the table in my main content area, but this is simple HTML, and I&#8217;ll leave for the reader to figure out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2009/01/22/build-page-layouts-without-breadcrumbs-or-a-title/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Another day, another master page</title>
		<link>http://www.novolocus.com/2008/11/13/another-day-another-master-page/</link>
		<comments>http://www.novolocus.com/2008/11/13/another-day-another-master-page/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 12:00:53 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[Master Pages]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=931</guid>
		<description><![CDATA[Well, I&#8217;ve just built a lovely little HTTP Module that lets us redirect the application pages for a site or site collection to a new master page. I&#8217;m quite pleased, to be honest. Anyway, I noticed that the error pages in the site I was testing on were not using my new master page, so [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I&#8217;ve just built a lovely little HTTP Module that lets us redirect the application pages for a site or site collection to a new master page. I&#8217;m quite pleased, to be honest. Anyway, I noticed that the error pages in the site I was testing on were not using my new master page, so I started to examine this. I found that the error page (<em>_layouts/error.aspx</em>) is busy using <em>simple.master</em>. WTF?</p>
<p>It makes sense, I guess. You do need a master page which doesn&#8217;t run in an authenticated context, and a brief check shows that this is the master pages for the out-of-box Forms authentication page.</p>
<p>I decided to check out if there were other master pages in Layouts &#8211; and there were. My list of master pages is now:</p>
<ol>
<li><strong><em>Default.master</em></strong> &#8211; used in normal sites. Often replaced for publishing sites.</li>
<li><strong><em>MwsDefault.master</em></strong> &#8211; use in Meeting Workspaces. Awkward to replace, but can be done through code or SharePoint designer.</li>
<li><strong>Application.master</strong> &#8211; used in &#8216;administration&#8217; pages, and sometimes pages such as &#8216;View all site contents&#8217;, Recycle bin, and uploading a file.</li>
<li><strong>Simple.master</strong> &#8211; used in pages that need to run in an unauthenticated context &#8211; such as error pages, or forms authentication pages.</li>
<li><strong>sspadmin.master</strong> &#8211; seems to be used editing audiences, in excel services configuration, in profile administration, and handful of other places.</li>
<li><strong>layouts.master</strong> &#8211; no idea what this is for. Can&#8217;t find where it is used!</li>
<li><strong>dialog.master</strong> &#8211; used in the little pop-up dialogs, such as when you&#8217;re adding or editing a Hyperlink.</li>
<li><strong>pickerdialog.master</strong> &#8211; used in pop-up dialogs such as the web part gallery, or selecting users.</li>
</ol>
<p>The master pages in italics are comparatively easy to replace; the rest are much more difficult. And try as I might, I couldn&#8217;t change the master page for Errors in my HTTP Module. I guess what I&#8217;ll do is write another one to redirect errors to my own custom-branded error page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2008/11/13/another-day-another-master-page/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Where to put CSS when branding?</title>
		<link>http://www.novolocus.com/2008/11/10/where-to-put-css-when-branding/</link>
		<comments>http://www.novolocus.com/2008/11/10/where-to-put-css-when-branding/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 12:00:07 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[Master Pages]]></category>
		<category><![CDATA[STSADM]]></category>
		<category><![CDATA[Themes]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=661</guid>
		<description><![CDATA[I&#8217;ve recently come to the conclusion that I&#8217;m unlikely to use Themes in SharePoint again in a hurry. Why?

Themes allow you to provide a bunch of CSS styles. So does the AlternateCssURL.
Themes have to be applied site-by-site (unless you do some programming, or extend STSADM). Alternate CSS or Master Pages can be changed for a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently come to the conclusion that I&#8217;m unlikely to use Themes in SharePoint again in a hurry. Why?</p>
<ul>
<li>Themes allow you to provide a bunch of CSS styles. So does the <strong><a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.alternatecssurl.aspx">AlternateCssURL</a></strong>.</li>
<li>Themes have to be applied site-by-site (unless you <a href="http://www.novolocus.com/2008/10/17/programmatically-apply-a-default-theme-in-sharepoint/">do some programming</a>, or extend STSADM). Alternate CSS or Master Pages can be changed for a site and subsites, for a Publishing site anyway (although with <a href="http://www.novolocus.com/2008/10/22/setting-a-site-master-on-a-publishing-site-breaks-meeting-workspaces/">some limitations</a>).</li>
<li>Alternate CSS can be provisioned from a single URL &#8211; so benefiting from browser caching <a href="http://www.novolocus.com/2008/10/29/where-should-i-store-the-images-for-my-theme/">just like images</a>.</li>
<li>The Alternate CSS can <a href="http://www.novolocus.com/2008/10/20/style-the-datepicker-using-an-alternate-css/">style the DatePicker</a>. Themes can&#8217;t.</li>
<li>The Alternate CSS can style <a href="http://www.novolocus.com/2008/08/18/pages-in-sharepoint-v-application-pages/">Application Pages</a>, just like Themes (but unlike Master Pages).</li>
<li>No problems with <a href="http://www.novolocus.com/2008/11/03/what-happens-when-a-theme-is-applied/">&#8216;Style Merging&#8217; when the Theme is provisioned</a>.</li>
<li>Style can be updated in one location.</li>
<li>Themes can be changed through the UI for any site. Only Publishing sites have a user interface for changing the Alternate CSS.</li>
</ul>
<p>Yes, many of the same distinctions between <a href="http://www.novolocus.com/2007/10/10/sharepoint-branding-or-pimp-my-sharepoint/">Master Pages and Themes</a> still exist, and the same sort of <a href="http://heathersolomon.com/blog/archive/2007/05/13/Master-Pages-vs.-Themes-Which-Do-You-Choose.aspx">analysis and choice of approach</a> should be done. However, it means that we can kind of ignore Master Pages, and just focus on Alternate CSS vs Themes &#8211; and it seems to me that apart from the last point above, the Alternate CSS approach seems to equal or better than Themes.</p>
<p>Regarding the last point, well, to apply my theme I&#8217;d set the Alternate CSS in a Feature Receiver. This is okay, though, as I&#8217;d probably be writing one anyway to <a href="http://www.novolocus.com/2008/10/30/feature-receiver-to-apply-master-pages/">apply the correct master page to different types of site</a>.</p>
<p>So, the answer I&#8217;ve come to now &#8211; I&#8217;d use the _<em>layouts </em>directory &#8211; create a sub-directory for your brand, and put your CSS and images in there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2008/11/10/where-to-put-css-when-branding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is MSOLayouts_MakeInvisibleIfEmpty()</title>
		<link>http://www.novolocus.com/2008/11/07/what-is-msolayouts_makeinvisibleifempty/</link>
		<comments>http://www.novolocus.com/2008/11/07/what-is-msolayouts_makeinvisibleifempty/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 09:21:31 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Page Layouts]]></category>
		<category><![CDATA[Rounded Corners]]></category>
		<category><![CDATA[Web Part Zones]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=484</guid>
		<description><![CDATA[I was looking through the code of SharePoint&#8217;s Blank Web Part page layout, and I kept finding elements called _invisibleIfEmpty. Now, I&#8217;d noticed that some page layouts, such as the Splash page layout had borders on their web part zones which were only shown if the zone contained a web part. I was interested in [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking through the code of SharePoint&#8217;s <em>Blank Web Part</em> page layout, and I kept finding elements called _<em>invisibleIfEmpty</em>. Now, I&#8217;d noticed that some page layouts, such as the <em>Splash </em>page layout had borders on their web part zones which were only shown if the zone contained a web part. I was interested in how this might work. People keep asking for web parts with borders, preferrably ones with rounded corners.<span id="more-484"></span></p>
<p>The code on the page looked like:</p>
<p><code>&lt;td id="_invisibleIfEmpty" name="_invisibleIfEmpty" valign="top" height="100%"&gt;</code><code> &lt;WebPartPages:WebPartZone runat="server" Title="Left" ID="CenterLeftColumn"&gt;&lt;ZoneTemplate&gt;&lt;/ZoneTemplate&gt;&lt;/WebPartPages:WebPartZone&gt; &lt;/td&gt;</code></p>
<p>&#8230;and there were a lot of table cells looking like that, and with that id. Lower in the page I then noticed:<br />
<code><br />
&lt;script language="javascript"&gt;if(typeof(MSOLayout_MakeInvisibleIfEmpty) == "function") {MSOLayout_MakeInvisibleIfEmpty();}&lt;/script&gt;</code></p>
<p>Hmm. So if this function exists, it&#8217;s run. For it&#8217;s name, it sounds related. After some digging, I found it in defined in:</p>
<ul>
<li>IE50UP.js</li>
<li>IE55UP.js</li>
<li>NON_IE.js</li>
</ul>
<p>Interesting&#8230; IE5 is, well, pretty ancient now, so I&#8217;m guessing that this stuff is a bit, well, WSS2 legacy. What does the code do? Well, looking in one of those files:</p>
<p>f<code>unction MSOLayout_MakeInvisibleIfEmpty()<br />
{<br />
var allElements=document.getElementsByName("_invisibleIfEmpty");<br />
var agt=navigator.userAgent.toLowerCase();<br />
var isNav=((agt.indexOf('mozilla')!=-1)&amp;&amp;((agt.indexOf('spoofer')==-1) &amp;&amp; (agt.indexOf('compatible')==-1)));<br />
var isIE=(agt.indexOf("msie")!=-1);<br />
for (var curElement=0; curElement &lt; allElements.length; curElement++)<br />
{<br />
if ((isIE &amp;&amp; allElements[curElement].childNodes.length==0)<br />
|| (isNav &amp;&amp; allElements[curElement].childNodes.length &lt;=1))<br />
{<br />
allElements[curElement].style.display="none";<br />
}<br />
}<br />
}</code></p>
<p>Yup, so it makes table cells called <em>_invisibleIfEmpty</em> not display if they have no child nodes. That&#8217;s a little strange though &#8211; table cells do collapse anyway if there are no contents, and doing this in Javascript just seems a bit old school.</p>
<p>I went and looked inside the Splash page layout and found that that is exactly how it works &#8211; the table cell&#8217;s borders don&#8217;t appear if the cell is empty:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2008/10/splash.png"><img class="alignnone size-medium wp-image-920" title="splash" src="http://www.novolocus.com/wp-content/uploads/2008/10/splash-300x243.png" alt="" width="300" height="243" /></a></p>
<p>However, the table cells do still appear to take up space &#8211; &#8216;cos each table cell has a width set:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2008/10/splash-code.png"><img class="alignnone size-medium wp-image-921" title="splash-code" src="http://www.novolocus.com/wp-content/uploads/2008/10/splash-code-300x72.png" alt="" width="300" height="72" /></a></p>
<p>If we took that <em>width=&#8221;50%&#8221;</em> away, though, the cells would just collapse as normal for empty table cells in HTML.</p>
<p>Still, the who thing did make me wonder &#8211; could I do my &#8217;round cornered borders on web part zones&#8217; with Javascript?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2008/11/07/what-is-msolayouts_makeinvisibleifempty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Sites links HoverCellActive doesn&#8217;t show the top border</title>
		<link>http://www.novolocus.com/2008/11/06/my-sites-links-hovercellactive-doesnt-show-the-top-border/</link>
		<comments>http://www.novolocus.com/2008/11/06/my-sites-links-hovercellactive-doesnt-show-the-top-border/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 15:52:19 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[Navigation]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=891</guid>
		<description><![CDATA[This has caught me out three times now &#8211; I build style, but the top border for the global links &#8216;My Links&#8217; link didn&#8217;t show:

I checked my style, and there it was. So I tried adding a margin, or padding in the cell that contained it.
Wrong. It needs it&#8217;s height to be set to 100%.
.ms-globalbreadcrumb [...]]]></description>
			<content:encoded><![CDATA[<p>This has caught me out three times now &#8211; I build style, but the top border for the global links &#8216;My Links&#8217; link didn&#8217;t show:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2008/10/hover-1.png"><img class="alignnone size-medium wp-image-918" title="hover with no top border" src="http://www.novolocus.com/wp-content/uploads/2008/10/hover-1.png" alt="" width="128" height="37" /></a></p>
<p>I checked my style, and there it was. So I tried adding a margin, or padding in the cell that contained it.</p>
<p>Wrong. It needs it&#8217;s height to be set to 100%.</p>
<p><code>.ms-globalbreadcrumb .ms-HoverCellActive,<br />
.ms-globalbreadcrumb .ms-HoverCellInctive,<br />
.ms-globalbreadcrumb .ms-HoverCellActiveDark{<br />
height:100%;<br />
padding-top:1px;<br />
}<br />
</code><br />
<a href="http://www.novolocus.com/wp-content/uploads/2008/10/hover-2.png"><img class="alignnone size-medium wp-image-919" title="hover working" src="http://www.novolocus.com/wp-content/uploads/2008/10/hover-2.png" alt="" width="128" height="41" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2008/11/06/my-sites-links-hovercellactive-doesnt-show-the-top-border/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stuff I forgot to style</title>
		<link>http://www.novolocus.com/2008/11/04/stuff-i-forgot-to-style/</link>
		<comments>http://www.novolocus.com/2008/11/04/stuff-i-forgot-to-style/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 12:00:31 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Error]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=887</guid>
		<description><![CDATA[SharePoint has a lot of page elements, and it&#8217;s hard to brand it all without missing things. Lists of Page elements like Heather Solomon&#8217;s CSS Reference Chart and her &#8220;Oh crap, I missed that&#8221; list help, but I still found a few that weren&#8217;t mentioned. So, I guess this is my &#8220;Thank God my testing [...]]]></description>
			<content:encoded><![CDATA[<p>SharePoint has a lot of page elements, and it&#8217;s hard to brand it all without missing things. Lists of Page elements like Heather Solomon&#8217;s <a href="http://www.heathersolomon.com/blog/articles/SharepointDesignGotchas.aspx">CSS Reference Chart </a>and her <a href="http://www.heathersolomon.com/blog/articles/SharepointDesignGotchas.aspx">&#8220;Oh crap, I missed that&#8221; list </a>help, but I still found a few that weren&#8217;t mentioned. So, I guess this is my &#8220;Thank God my testing found I&#8217;d missed that&#8221; list:</p>
<table class="displayTable" border="0">
<tbody>
<tr>
<td><a href="http://www.novolocus.com/wp-content/uploads/2008/10/advanced-search.png"><img class="alignnone size-thumbnail wp-image-888" title="advanced-search-dialog" src="http://www.novolocus.com/wp-content/uploads/2008/10/advanced-search-137x150.png" alt="" width="137" height="150" /></a></td>
<td><strong>Advanced Search Page</strong> &#8211; nice grey.</td>
</tr>
<tr>
<td><a href="http://www.novolocus.com/wp-content/uploads/2008/10/create-page.png"><img class="alignnone size-thumbnail wp-image-893" title="create-page-hover" src="http://www.novolocus.com/wp-content/uploads/2008/10/create-page-150x64.png" alt="" width="150" height="64" /></a></td>
<td><strong>Creation Information Panel</strong> &#8211; when you hover over an item on the &#8216;Create&#8217; page, you&#8217;ll see this.</td>
</tr>
<tr>
<td><a href="http://www.novolocus.com/wp-content/uploads/2008/10/people-search-options.png"><img class="alignnone size-thumbnail wp-image-894" title="people-search-options" src="http://www.novolocus.com/wp-content/uploads/2008/10/people-search-options-150x79.png" alt="" width="150" height="79" /></a></td>
<td><strong>People Search Options</strong> &#8211; shown dynamically when you click the link.</td>
</tr>
<tr>
<td><a href="http://www.novolocus.com/wp-content/uploads/2008/10/project-tasks-list-with-gannt-view.png"><img class="alignnone size-thumbnail wp-image-895" title="project-tasks-list-with-gannt-view" src="http://www.novolocus.com/wp-content/uploads/2008/10/project-tasks-list-with-gannt-view-150x122.png" alt="" width="150" height="122" /></a></td>
<td><strong>Gantt views </strong>- as used in projects</td>
</tr>
<tr>
<td><a href="http://www.novolocus.com/wp-content/uploads/2008/10/repeating-meeting.png"><img class="alignnone size-thumbnail wp-image-896" title="repeating-meeting" src="http://www.novolocus.com/wp-content/uploads/2008/10/repeating-meeting-96x150.png" alt="" width="96" height="150" /></a></td>
<td><strong>Repeating Meeting Left Nav</strong></td>
</tr>
<tr>
<td><a href="http://www.novolocus.com/wp-content/uploads/2008/10/wss-seach.png"><img class="alignnone size-thumbnail wp-image-897" title="wss-search" src="http://www.novolocus.com/wp-content/uploads/2008/10/wss-seach-150x64.png" alt="" width="150" height="64" /></a></td>
<td><strong>WSS Search results page</strong> &#8211; just &#8216;cos you&#8217;re using it doesn&#8217;t mean it isn&#8217;t there &#8211; or that it won&#8217;t be seen&#8230;</td>
</tr>
<tr>
<td><a href="http://www.novolocus.com/wp-content/uploads/2008/10/popup-calendar.png"><img class="alignnone size-thumbnail wp-image-898" title="popup-calendar" src="http://www.novolocus.com/wp-content/uploads/2008/10/popup-calendar-150x122.png" alt="" width="150" height="122" /></a></td>
<td><strong>The Date Picker</strong> &#8211; and <a href="http://www.novolocus.com/2008/10/20/style-the-datepicker-using-an-alternate-css/">all the problems inherent in that&#8230;</a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2008/11/04/stuff-i-forgot-to-style/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What happens when a Theme is applied?</title>
		<link>http://www.novolocus.com/2008/11/03/what-happens-when-a-theme-is-applied/</link>
		<comments>http://www.novolocus.com/2008/11/03/what-happens-when-a-theme-is-applied/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 13:40:58 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Themes]]></category>

		<guid isPermaLink="false">http://www.novolocus.com/?p=923</guid>
		<description><![CDATA[You can apply themes to sites in SharePoint &#8211; but what actually happens when you do? Firstly, as a quick reminder, on the Site Administration pages, you can go to see the installed themes:

And select one:

Your site will then have a different theme. Great! But how does this work? Well, lets open our site in [...]]]></description>
			<content:encoded><![CDATA[<p>You can apply themes to sites in SharePoint &#8211; but what actually happens when you do? <span id="more-923"></span>Firstly, as a quick reminder, on the Site Administration pages, you can go to see the installed themes:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2008/10/set-theme-link.png"><img class="alignnone size-medium wp-image-924" title="set-theme-link" src="http://www.novolocus.com/wp-content/uploads/2008/10/set-theme-link-300x212.png" alt="" width="300" height="212" /></a></p>
<p>And select one:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2008/10/set-theme-page.png"><img class="alignnone size-medium wp-image-925" title="set-theme-page" src="http://www.novolocus.com/wp-content/uploads/2008/10/set-theme-page-300x207.png" alt="" width="300" height="207" /></a></p>
<p>Your site will then have a different theme. Great! But how does this work? Well, lets open our site in SharePoint Designer:</p>
<p><a href="http://www.novolocus.com/wp-content/uploads/2008/10/themes-folder-in-sharepoint-designer.png"><img class="alignnone size-medium wp-image-926" title="themes-folder-in-sharepoint-designer" src="http://www.novolocus.com/wp-content/uploads/2008/10/themes-folder-in-sharepoint-designer-149x300.png" alt="" width="149" height="300" /></a></p>
<p>That&#8217;s right, a folder <em>_themes</em>, containing the theme we just applied in a folder. That theme is the CSS and all the images. Because of SharePoint&#8217;s virtual file system, that isn&#8217;t as inefficient as it sounds, but &#8216;cos our theme is being provided from our site, each CSS file and each image will be at a different URL for every site. This might be fine if you wanted to be able to  customize the theme on a per-site basis (and you can!) &#8211; but it <a href="http://www.novolocus.com/2008/10/29/where-should-i-store-the-images-for-my-theme/">eliminates some of the advantage browser caching</a>, and I don&#8217;t think most organisations will want their theme customised on any sites &#8211; branding should be consistent.</p>
<p>The observant of you will notice multiple CSS files in the Theme folder (&#8216;Plastic&#8217; above). How does that work?</p>
<p>Well, if you look in <em>12/TEMPLATES/THEMES</em>, the themes themeselves don&#8217;t have the CSS file that you&#8217;ll find referenced in your Site&#8217;s pages. Instead, when you apply the theme, SharePoint takes all of the CSS files and appends them together into one file which it uses (<em>Plas1011-650001.css</em>, in yellow above).</p>
<p>I only actually found this as most instructions on creating a new theme start by telling you to copy an existing one. This is fine, but I forgot that there were more CSS files than just my <em>Theme.css</em>. Specifically, the <em>mossExtension.css</em> file was being added after the end of my themes, and it was overriding some of the styles I&#8217;d defined. As the order of the themes being defined is very important, I do think this &#8216;adding together&#8217; of CSS files is somewhat dangerous.</p>
<p>Anyway, once a single CSS file has been created, the master page will insert a URL to that file into the page &lt;head&gt; section, and that&#8217;s how your styles apply.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.novolocus.com/2008/11/03/what-happens-when-a-theme-is-applied/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
