<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Lets talk SharePoint!</title>
    <link>http://marie.amende.no/</link>
    <description>Marie Kristin Johansen - sharing what I have experienced</description>
    <language>en-us</language>
    <copyright>Marie Kristin Johansen</copyright>
    <lastBuildDate>Tue, 28 Jul 2009 10:21:50 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.1.8102.813</generator>
    <managingEditor>mkj@amende.no</managingEditor>
    <webMaster>mkj@amende.no</webMaster>
    <item>
      <trackback:ping>http://marie.amende.no/Trackback.aspx?guid=066e8d1e-2bfc-425b-aaa2-65ab38629fac</trackback:ping>
      <pingback:server>http://marie.amende.no/pingback.aspx</pingback:server>
      <pingback:target>http://marie.amende.no/PermaLink,guid,066e8d1e-2bfc-425b-aaa2-65ab38629fac.aspx</pingback:target>
      <dc:creator>Marie Kristin Johansen</dc:creator>
      <wfw:comment>http://marie.amende.no/CommentView,guid,066e8d1e-2bfc-425b-aaa2-65ab38629fac.aspx</wfw:comment>
      <wfw:commentRss>http://marie.amende.no/SyndicationService.asmx/GetEntryCommentsRss?guid=066e8d1e-2bfc-425b-aaa2-65ab38629fac</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">The SharePoint team has posted som videos
showing some of the new features in SharePoint 2010. 
<br /><br />
The videos can be found on the new SharePoint 2010 <a href="http://sharepoint.microsoft.com/2010">web
site</a>. 
<br /><br /><br />
I can't wait to get my hands on this!<img width="0" height="0" src="http://marie.amende.no/aggbug.ashx?id=066e8d1e-2bfc-425b-aaa2-65ab38629fac" /></body>
      <title>Sneak peek SharePoint 2010</title>
      <guid isPermaLink="false">http://marie.amende.no/PermaLink,guid,066e8d1e-2bfc-425b-aaa2-65ab38629fac.aspx</guid>
      <link>http://marie.amende.no/2009/07/28/SneakPeekSharePoint2010.aspx</link>
      <pubDate>Tue, 28 Jul 2009 10:21:50 GMT</pubDate>
      <description>The SharePoint team has posted som videos showing some of the new features in SharePoint 2010. &lt;br&gt;
&lt;br&gt;
The videos can be found on the new SharePoint 2010 &lt;a href="http://sharepoint.microsoft.com/2010"&gt;web
site&lt;/a&gt;. 
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
I can't wait to get my hands on this!&lt;img width="0" height="0" src="http://marie.amende.no/aggbug.ashx?id=066e8d1e-2bfc-425b-aaa2-65ab38629fac" /&gt;</description>
      <comments>http://marie.amende.no/CommentView,guid,066e8d1e-2bfc-425b-aaa2-65ab38629fac.aspx</comments>
      <category>SharePoint 2010</category>
    </item>
    <item>
      <trackback:ping>http://marie.amende.no/Trackback.aspx?guid=2d118c7a-a5ab-48a7-91a5-1554b3ec57ce</trackback:ping>
      <pingback:server>http://marie.amende.no/pingback.aspx</pingback:server>
      <pingback:target>http://marie.amende.no/PermaLink,guid,2d118c7a-a5ab-48a7-91a5-1554b3ec57ce.aspx</pingback:target>
      <dc:creator>Marie Kristin Johansen</dc:creator>
      <wfw:comment>http://marie.amende.no/CommentView,guid,2d118c7a-a5ab-48a7-91a5-1554b3ec57ce.aspx</wfw:comment>
      <wfw:commentRss>http://marie.amende.no/SyndicationService.asmx/GetEntryCommentsRss?guid=2d118c7a-a5ab-48a7-91a5-1554b3ec57ce</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yes it is possible:) All you have to do is alter the properties of your Content Query
Web Part. To be able to do this do the following:
</p>
        <p>
1. Eksport your content query web part. 
</p>
        <p>
2. Localise the "CommonViewFields" property in your web part. This should look someting
like this:
</p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">&lt;property
name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"CommonViewFields"</span> type=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"string"</span> /&gt;</span>
        </p>
        <p>
3. Replace this line by this:
</p>
        <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">&lt;property
name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"CommonViewFields"</span> type=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"string"</span>&gt;Topic,Lookup;&lt;/property&gt;</span>
          </pre>
          <p>
            <font face="Verdana" size="2">Where "Topic" is the internal name of your column.</font>
          </p>
        </span>
        <p>
4. Localise the "AdditionalFilterFields"
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">&lt;property
name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"AdditionalFilterFields"</span> type=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"string"</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"true"</span> /&gt;</span>
        </pre>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <font face="Verdana" size="2">5.
Replace it with the following line:</font>
          </span>
        </pre>
        <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
          <font face="Verdana" size="2">
            <pre>
              <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">&lt;property
name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"AdditionalFilterFields"</span> type=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Lookup"</span>&gt;Topic&lt;/property&gt;</span>
            </pre>
            <p>
6. Save your web part, upload it an drag it on to your page. Check to see if the column
is visible in the filter drop down.
</p>
          </font>
        </span>
        <img width="0" height="0" src="http://marie.amende.no/aggbug.ashx?id=2d118c7a-a5ab-48a7-91a5-1554b3ec57ce" />
      </body>
      <title>Filter on lookup fields in Content Query Web Part</title>
      <guid isPermaLink="false">http://marie.amende.no/PermaLink,guid,2d118c7a-a5ab-48a7-91a5-1554b3ec57ce.aspx</guid>
      <link>http://marie.amende.no/2009/01/24/FilterOnLookupFieldsInContentQueryWebPart.aspx</link>
      <pubDate>Sat, 24 Jan 2009 06:52:05 GMT</pubDate>
      <description>&lt;p&gt;
Yes it is possible:) All you have to do is alter the properties of your Content Query
Web Part. To be able to do this do the following:
&lt;/p&gt;
&lt;p&gt;
1. Eksport your content query web part. 
&lt;/p&gt;
&lt;p&gt;
2. Localise the "CommonViewFields" property in your web part. This should look someting
like this:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;lt;property
name=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"CommonViewFields"&lt;/span&gt; type=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"string"&lt;/span&gt; /&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
3. Replace this line by this:
&lt;/p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;lt;property
name=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"CommonViewFields"&lt;/span&gt; type=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"string"&lt;/span&gt;&amp;gt;Topic,Lookup;&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;font face=Verdana size=2&gt;Where "Topic" is the internal name of your column.&lt;/font&gt;
&lt;/span&gt;&gt;
&lt;p&gt;
4. Localise the "AdditionalFilterFields"
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;lt;property
name=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"AdditionalFilterFields"&lt;/span&gt; type=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"string"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;null&lt;/span&gt;=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"true"&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana size=2&gt;5.
Replace it with the following line:&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana size=2&gt;&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;lt;property
name=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"AdditionalFilterFields"&lt;/span&gt; type=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Lookup"&lt;/span&gt;&amp;gt;Topic&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
6. Save your web part, upload it an drag it on to your page. Check to see if the column
is visible in the filter drop down.
&lt;/font&gt;&lt;/span&gt;&gt;
&lt;img width="0" height="0" src="http://marie.amende.no/aggbug.ashx?id=2d118c7a-a5ab-48a7-91a5-1554b3ec57ce" /&gt;</description>
      <comments>http://marie.amende.no/CommentView,guid,2d118c7a-a5ab-48a7-91a5-1554b3ec57ce.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://marie.amende.no/Trackback.aspx?guid=3e61aef3-ceec-434f-ad81-692d6c0359d9</trackback:ping>
      <pingback:server>http://marie.amende.no/pingback.aspx</pingback:server>
      <pingback:target>http://marie.amende.no/PermaLink,guid,3e61aef3-ceec-434f-ad81-692d6c0359d9.aspx</pingback:target>
      <dc:creator>Marie Kristin Johansen</dc:creator>
      <wfw:comment>http://marie.amende.no/CommentView,guid,3e61aef3-ceec-434f-ad81-692d6c0359d9.aspx</wfw:comment>
      <wfw:commentRss>http://marie.amende.no/SyndicationService.asmx/GetEntryCommentsRss?guid=3e61aef3-ceec-434f-ad81-692d6c0359d9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">For some time we have struggled with getting
workflows created in SharePoint Designer to work when using these in Site Templates.
Luckily we found a blog post having a solution to the problem <a temp_href="http://agiledirect.wordpress.com/2007/11/21/sharepoint-designer-workflow-association-stsadm-repair-command/ " href="http://agiledirect.wordpress.com/2007/11/21/sharepoint-designer-workflow-association-stsadm-repair-command/%20">SharePoint
designer workflow association stsadm repair command</a> written by Emile Bosch. 
<br /><br />
Using this solution combined with a Feature Receiver running the stsadm command: -o
repairworkflowassociations -url http://yoursite fixed the problem. Be aware that the
user running your SharePoint application also needs to have access to start the processes.
It is not possible to use imperonation since the Process.Start() method uses the parent
process user no mather what. Trying to do this will give you an Access Denied error
message.<br /><br />
Here is the code for running stsadm command in code:<br /><pre><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">class</span> RepairWorkflowAssociations
: SPFeatureReceiver<br />
{<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">override</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> FeatureActivated(SPFeatureReceiverProperties
properties)<br />
{<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">string</span> prgFilePath <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> System.Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles); 
<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">string</span> stsadmPath <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> prgFilePath <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">+</span><span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">@"\Microsoft
Shared\web server extensions\12\BIN\stsadm.exe"</span>; 
<br /><br />
System.Diagnostics.Process proc <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">new</span> System.Diagnostics.Process(); 
<br /><br /><span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//Set
the process properties</span><br />
proc.EnableRaisingEvents <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">false</span>; 
<br />
proc.StartInfo.FileName <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> stsadmPath;<br />
proc.StartInfo.UseShellExecute <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">false</span>;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">string</span> strWebUrl <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> SPContext.Current.Web.Url.ToString();<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">string</span> strOpertation <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"-o
repairworkflowassociations -url "</span>;<br /><br />
proc.StartInfo.Arguments <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> String.Format(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"{0}{1}"</span>,
strOpertation, strWebUrl);<br />
proc.Start(); 
<br /><br /><span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//</span></span><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">Wait
for the end of the process</span></span><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;"></span><br />
proc.WaitForExit();<br />
}<br />
} 
<br /><br /></span><font face="Verdana">We use activate this feature in a custom site creaton
method but it will work just as well using feature stapeling.</font><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"></span></pre><p></p><img width="0" height="0" src="http://marie.amende.no/aggbug.ashx?id=3e61aef3-ceec-434f-ad81-692d6c0359d9" /></body>
      <title>Fixing SPD workflow associations for site templates</title>
      <guid isPermaLink="false">http://marie.amende.no/PermaLink,guid,3e61aef3-ceec-434f-ad81-692d6c0359d9.aspx</guid>
      <link>http://marie.amende.no/2008/12/17/FixingSPDWorkflowAssociationsForSiteTemplates.aspx</link>
      <pubDate>Wed, 17 Dec 2008 10:37:55 GMT</pubDate>
      <description>For some time we have struggled with getting workflows created in SharePoint Designer to work when using these in Site Templates. Luckily we found a blog post having a solution to the problem &lt;a temp_href="http://agiledirect.wordpress.com/2007/11/21/sharepoint-designer-workflow-association-stsadm-repair-command/ " href="http://agiledirect.wordpress.com/2007/11/21/sharepoint-designer-workflow-association-stsadm-repair-command/%20"&gt;SharePoint
designer workflow association stsadm repair command&lt;/a&gt; written by Emile Bosch. 
&lt;br&gt;
&lt;br&gt;
Using this solution combined with a Feature Receiver running the stsadm command: -o
repairworkflowassociations -url http://yoursite fixed the problem. Be aware that the
user running your SharePoint application also needs to have access to start the processes.
It is not possible to use imperonation since the Process.Start() method uses the parent
process user no mather what. Trying to do this will give you an Access Denied error
message.&lt;br&gt;
&lt;br&gt;
Here is the code for running stsadm command in code:&lt;br&gt;
&lt;pre&gt;&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;class&lt;/span&gt; RepairWorkflowAssociations
: SPFeatureReceiver&lt;br&gt;
{&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;override&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; FeatureActivated(SPFeatureReceiverProperties
properties)&lt;br&gt;
{&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;string&lt;/span&gt; prgFilePath &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; System.Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles); 
&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;string&lt;/span&gt; stsadmPath &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; prgFilePath &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;+&lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;@"\Microsoft
Shared\web server extensions\12\BIN\stsadm.exe"&lt;/span&gt;; 
&lt;br&gt;
&lt;br&gt;
System.Diagnostics.Process proc &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;new&lt;/span&gt; System.Diagnostics.Process(); 
&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;//Set
the process properties&lt;/span&gt;
&lt;br&gt;
proc.EnableRaisingEvents &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;false&lt;/span&gt;; 
&lt;br&gt;
proc.StartInfo.FileName &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; stsadmPath;&lt;br&gt;
proc.StartInfo.UseShellExecute &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;false&lt;/span&gt;;&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;string&lt;/span&gt; strWebUrl &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; SPContext.Current.Web.Url.ToString();&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;string&lt;/span&gt; strOpertation &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"-o
repairworkflowassociations -url "&lt;/span&gt;;&lt;br&gt;
&lt;br&gt;
proc.StartInfo.Arguments &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; String.Format(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"{0}{1}"&lt;/span&gt;,
strOpertation, strWebUrl);&lt;br&gt;
proc.Start(); 
&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;//&lt;/span&gt;&lt;/span&gt;&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;Wait
for the end of the process&lt;/span&gt;&lt;/span&gt;&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;/span&gt;
&lt;br&gt;
proc.WaitForExit();&lt;br&gt;
}&lt;br&gt;
} 
&lt;br&gt;
&lt;br&gt;
&lt;/span&gt;&lt;font face="Verdana"&gt;We use activate this feature in a custom site creaton
method but it will work just as well using feature stapeling.&lt;/font&gt;&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://marie.amende.no/aggbug.ashx?id=3e61aef3-ceec-434f-ad81-692d6c0359d9" /&gt;</description>
      <comments>http://marie.amende.no/CommentView,guid,3e61aef3-ceec-434f-ad81-692d6c0359d9.aspx</comments>
      <category>Features</category>
      <category>SharePoint</category>
      <category>Workflows</category>
    </item>
    <item>
      <trackback:ping>http://marie.amende.no/Trackback.aspx?guid=fae04ec9-7c25-4e43-826f-54cea6a38b1a</trackback:ping>
      <pingback:server>http://marie.amende.no/pingback.aspx</pingback:server>
      <pingback:target>http://marie.amende.no/PermaLink,guid,fae04ec9-7c25-4e43-826f-54cea6a38b1a.aspx</pingback:target>
      <dc:creator>Marie Kristin Johansen</dc:creator>
      <wfw:comment>http://marie.amende.no/CommentView,guid,fae04ec9-7c25-4e43-826f-54cea6a38b1a.aspx</wfw:comment>
      <wfw:commentRss>http://marie.amende.no/SyndicationService.asmx/GetEntryCommentsRss?guid=fae04ec9-7c25-4e43-826f-54cea6a38b1a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The other day a customer of mine requested a list of links from a link list grouped
by topics, where when clicking the link title you got the description of the link
expanded below. 
</p>
        <p>
To do this I used a content query web part with a custom ItemStyle and a content editor
web part as a container for the JavaScript.
</p>
        <p>
In the ItemStyle template as shown below we first had to split the link returned from
the link list. This contains of the URL and the title formatted as "URL","title".
I created two variables, one for the Title (Target) and one for the URL (LinkUrl).
To get these I used those substring-before and substring-after functionality in xsl.
</p>
        <p>
After creating these variables I created a link tag for displaying the Title ($Target)
with a onClick starting a JavaScript function called showInfo('{$Target}') taking
the xsl variable "Target" as input value.
</p>
        <p>
To be able to match the description and the title clicked I had to create a dynamic
id for the div tag displaying the description. This is done using a xsl:element with
xsl:attribute elements. The id attribute of the div tag is set to the target variable.
This to match the input in the JavaScript function and the description block. The
div also get a style attribute to be able to dynamically hide and show the contents
of this div when clicking the title of the link.
</p>
        <p>
At the end of the style we display a text redirecting to the actual source page by
using the LinkUrl variable.
</p>
        <p>
Here is the full template witch should go either in the ItemStyle.xsl file. I usually
create a custom ItemStyle.xsl for my customers and deploy this as an feature to avoid
tempering with the original xslts, but this is up to you.
</p>
        <pre>
          <span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent;">&lt;xsl:template
name=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"LinkList"</span> match=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"Row[@Style='LinkList']"</span> mode=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"itemstyle"</span>&gt;
&lt;xsl:variable name=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"DisplayTitle"</span>&gt;
&lt;xsl:call-template name=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"OuterTemplate.GetTitle"</span>&gt;
&lt;xsl:with-param name=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"Title"</span> select=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"@URL"</span>/&gt;
&lt;xsl:with-param name=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"UrlColumnName"</span> select=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"'URL'"</span>/&gt;
&lt;/xsl:call-template&gt; &lt;/xsl:variable&gt; &lt;xsl:variable name=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"LinkTarget"</span>&gt;
&lt;xsl:<span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;">if</span> test=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"@OpenInNewWindow
= 'True'"</span> &gt;_blank&lt;/xsl:<span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;">if</span>&gt;
&lt;/xsl:variable&gt; &lt;xsl:variable name=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"Target"</span>&gt;
&lt;xsl:value-of select=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"substring-after($DisplayTitle,',
')"</span>&gt;&lt;/xsl:value-of&gt; &lt;/xsl:variable&gt; &lt;xsl:variable name=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"LinkUrl"</span>&gt;
&lt;xsl:value-of select=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"substring-before($DisplayTitle,',
')"</span>&gt;&lt;/xsl:value-of&gt; &lt;/xsl:variable&gt; &lt;div id=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"linkitem"</span><span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;">class</span>=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"item"</span> &gt;
&lt;div <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;">class</span>=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"link-item"</span>&gt;
&lt;xsl:call-template name=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"OuterTemplate.CallPresenceStatusIconTemplate"</span>/&gt;
&lt;a name <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent;">=</span><span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"{$Target}"</span> id=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"category"</span> href=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"#{$Target}"</span> temp_href=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"#{$Target}"</span> onclick=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"showInfo('{$Target}');"</span>&gt;<br />
&lt;xsl:value-of select=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"substring-after($DisplayTitle,',
')"</span>&gt;&lt;/xsl:value-of&gt;<br />
&lt;/a&gt; &lt;xsl:element name=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"div"</span>&gt;
&lt;xsl:attribute name=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"id"</span>&gt;
&lt;xsl:value-of select=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"$Target"</span>&gt;&lt;/xsl:value-of&gt;
&lt;/xsl:attribute&gt; &lt;xsl:attribute name=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"style"</span>&gt;
display:none;color:black; &lt;/xsl:attribute&gt; &lt;br /&gt; &lt;xsl:value-of select=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"@Description"</span>&gt;&lt;/xsl:value-of&gt;
&lt;a href=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"{$LinkUrl}"</span> temp_href=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"{$LinkUrl}"</span>&gt;
Gå til denne siden.&lt;/a&gt; &lt;/xsl:element&gt; &lt;/div&gt; &lt;/div&gt; &lt;/xsl:template&gt; </span>
        </pre>
        <p>
To Show / Hide the description we simply use the JavaScript below, hidden on the page
by using a content editor web part. You can also put the script in the page itself
or as a linked file.
</p>
        <p>
First we find the div tag corresponding to the clicked link then we check whether
the comment is collapsed or expanded at the moment and sets the style tag to the opposite. 
</p>
        <p>
And here is the JavaScript:
</p>
        <pre>
          <span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent;">&lt;script
language=<span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);">"JavaScript"</span>&gt;
function showInfo(link) { var divs <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent;">=</span> document.getElementsByTagName('div'); <span style="font-size: 11px; color: green; font-family: Courier New; background-color: transparent;">//alert(link);</span><span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;">for</span> (var
k <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent;">=</span> divs.length <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent;">-</span> 1;
k &gt;= 0; k--) { <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;">if</span> (divs[k].id
== link) { <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;">if</span>(divs[k].style.display
== 'none') { divs[k].style.display <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent;">=</span> 'inline';
} <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;">else</span> {
divs[k].style.display <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent;">=</span> 'none';
} } } } &lt;/script&gt; </span>
        </pre>
        <img width="0" height="0" src="http://marie.amende.no/aggbug.ashx?id=fae04ec9-7c25-4e43-826f-54cea6a38b1a" />
      </body>
      <title>Using JavaScript to create expanding and collapsing Item Styles</title>
      <guid isPermaLink="false">http://marie.amende.no/PermaLink,guid,fae04ec9-7c25-4e43-826f-54cea6a38b1a.aspx</guid>
      <link>http://marie.amende.no/2008/12/09/UsingJavaScriptToCreateExpandingAndCollapsingItemStyles.aspx</link>
      <pubDate>Tue, 09 Dec 2008 16:41:26 GMT</pubDate>
      <description>&lt;p&gt;
The other day a customer of mine requested a list of links from a link list grouped
by topics, where when clicking the link title you got the description of the link
expanded below. 
&lt;/p&gt;
&lt;p&gt;
To do this I used a content query web part with a custom ItemStyle and a content editor
web part as a container for the JavaScript.
&lt;/p&gt;
&lt;p&gt;
In the ItemStyle template as shown below we first had to split the link returned from
the link list. This contains of the URL and the title formatted as "URL","title".
I created two variables, one for the Title (Target) and one for the URL (LinkUrl).
To get these I used those substring-before and substring-after functionality in xsl.
&lt;/p&gt;
&lt;p&gt;
After creating these variables I created a link tag for displaying the Title ($Target)
with a onClick starting a JavaScript function called showInfo('{$Target}') taking
the xsl variable "Target" as input value.
&lt;/p&gt;
&lt;p&gt;
To be able to match the description and the title clicked I had to create a dynamic
id for the div tag displaying the description. This is done using a xsl:element with
xsl:attribute elements. The id attribute of the div tag is set to the target variable.
This to match the input in the JavaScript function and the description block. The
div also get a style attribute to be able to dynamically hide and show the contents
of this div when clicking the title of the link.
&lt;/p&gt;
&lt;p&gt;
At the end of the style we display a text redirecting to the actual source page by
using the LinkUrl variable.
&lt;/p&gt;
&lt;p&gt;
Here is the full template witch should go either in the ItemStyle.xsl file. I usually
create a custom ItemStyle.xsl for my customers and deploy this as an feature to avoid
tempering with the original xslts, but this is up to you.
&lt;/p&gt;
&lt;pre&gt;&lt;span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent;"&gt;&amp;lt;xsl:template
name=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"LinkList"&lt;/span&gt; match=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"Row[@Style='LinkList']"&lt;/span&gt; mode=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"itemstyle"&lt;/span&gt;&amp;gt;
&amp;lt;xsl:variable name=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"DisplayTitle"&lt;/span&gt;&amp;gt;
&amp;lt;xsl:call-template name=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"OuterTemplate.GetTitle"&lt;/span&gt;&amp;gt;
&amp;lt;xsl:with-param name=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"Title"&lt;/span&gt; select=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"@URL"&lt;/span&gt;/&amp;gt;
&amp;lt;xsl:with-param name=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"UrlColumnName"&lt;/span&gt; select=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"'URL'"&lt;/span&gt;/&amp;gt;
&amp;lt;/xsl:call-template&amp;gt; &amp;lt;/xsl:variable&amp;gt; &amp;lt;xsl:variable name=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"LinkTarget"&lt;/span&gt;&amp;gt;
&amp;lt;xsl:&lt;span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;"&gt;if&lt;/span&gt; test=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"@OpenInNewWindow
= 'True'"&lt;/span&gt; &amp;gt;_blank&amp;lt;/xsl:&lt;span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;"&gt;if&lt;/span&gt;&amp;gt;
&amp;lt;/xsl:variable&amp;gt; &amp;lt;xsl:variable name=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"Target"&lt;/span&gt;&amp;gt;
&amp;lt;xsl:value-of select=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"substring-after($DisplayTitle,',
')"&lt;/span&gt;&amp;gt;&amp;lt;/xsl:value-of&amp;gt; &amp;lt;/xsl:variable&amp;gt; &amp;lt;xsl:variable name=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"LinkUrl"&lt;/span&gt;&amp;gt;
&amp;lt;xsl:value-of select=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"substring-before($DisplayTitle,',
')"&lt;/span&gt;&amp;gt;&amp;lt;/xsl:value-of&amp;gt; &amp;lt;/xsl:variable&amp;gt; &amp;lt;div id=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"linkitem"&lt;/span&gt; &lt;span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;"&gt;class&lt;/span&gt;=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"item"&lt;/span&gt; &amp;gt;
&amp;lt;div &lt;span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;"&gt;class&lt;/span&gt;=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"link-item"&lt;/span&gt;&amp;gt;
&amp;lt;xsl:call-template name=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"OuterTemplate.CallPresenceStatusIconTemplate"&lt;/span&gt;/&amp;gt;
&amp;lt;a name &lt;span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent;"&gt;=&lt;/span&gt;&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"{$Target}"&lt;/span&gt; id=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"category"&lt;/span&gt; href=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"#{$Target}"&lt;/span&gt; temp_href=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"#{$Target}"&lt;/span&gt; onclick=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"showInfo('{$Target}');"&lt;/span&gt;&amp;gt;&lt;br&gt;
&amp;lt;xsl:value-of select=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"substring-after($DisplayTitle,',
')"&lt;/span&gt;&amp;gt;&amp;lt;/xsl:value-of&amp;gt;&lt;br&gt;
&amp;lt;/a&amp;gt; &amp;lt;xsl:element name=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"div"&lt;/span&gt;&amp;gt;
&amp;lt;xsl:attribute name=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"id"&lt;/span&gt;&amp;gt;
&amp;lt;xsl:value-of select=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"$Target"&lt;/span&gt;&amp;gt;&amp;lt;/xsl:value-of&amp;gt;
&amp;lt;/xsl:attribute&amp;gt; &amp;lt;xsl:attribute name=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"style"&lt;/span&gt;&amp;gt;
display:none;color:black; &amp;lt;/xsl:attribute&amp;gt; &amp;lt;br /&amp;gt; &amp;lt;xsl:value-of select=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"@Description"&lt;/span&gt;&amp;gt;&amp;lt;/xsl:value-of&amp;gt;
&amp;lt;a href=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"{$LinkUrl}"&lt;/span&gt; temp_href=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"{$LinkUrl}"&lt;/span&gt;&amp;gt;
Gå til denne siden.&amp;lt;/a&amp;gt; &amp;lt;/xsl:element&amp;gt; &amp;lt;/div&amp;gt; &amp;lt;/div&amp;gt; &amp;lt;/xsl:template&amp;gt; &lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
To Show / Hide the description we simply use the JavaScript below, hidden on the page
by using a content editor web part. You can also put the script in the page itself
or as a linked file.
&lt;/p&gt;
&lt;p&gt;
First we find the div tag corresponding to the clicked link then we check whether
the comment is collapsed or expanded at the moment and sets the style tag to the opposite. 
&lt;/p&gt;
&lt;p&gt;
And here is the JavaScript:
&lt;/p&gt;
&lt;pre&gt;&lt;span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent;"&gt;&amp;lt;script
language=&lt;span style="font-size: 11px; color: rgb(102, 102, 102); font-family: Courier New; background-color: rgb(228, 228, 228);"&gt;"JavaScript"&lt;/span&gt;&amp;gt;
function showInfo(link) { var divs &lt;span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent;"&gt;=&lt;/span&gt; document.getElementsByTagName('div'); &lt;span style="font-size: 11px; color: green; font-family: Courier New; background-color: transparent;"&gt;//alert(link);&lt;/span&gt; &lt;span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;"&gt;for&lt;/span&gt; (var
k &lt;span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent;"&gt;=&lt;/span&gt; divs.length &lt;span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent;"&gt;-&lt;/span&gt; 1;
k &amp;gt;= 0; k--) { &lt;span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;"&gt;if&lt;/span&gt; (divs[k].id
== link) { &lt;span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;"&gt;if&lt;/span&gt;(divs[k].style.display
== 'none') { divs[k].style.display &lt;span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent;"&gt;=&lt;/span&gt; 'inline';
} &lt;span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent;"&gt;else&lt;/span&gt; {
divs[k].style.display &lt;span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent;"&gt;=&lt;/span&gt; 'none';
} } } } &amp;lt;/script&amp;gt; &lt;/span&gt;&lt;/pre&gt;&lt;img width="0" height="0" src="http://marie.amende.no/aggbug.ashx?id=fae04ec9-7c25-4e43-826f-54cea6a38b1a" /&gt;</description>
      <comments>http://marie.amende.no/CommentView,guid,fae04ec9-7c25-4e43-826f-54cea6a38b1a.aspx</comments>
      <category>Content Query Web Part</category>
      <category>ItemStyle</category>
      <category>JavaScript</category>
    </item>
    <item>
      <trackback:ping>http://marie.amende.no/Trackback.aspx?guid=b0f0ba15-debb-44a8-a0c7-acb41a50b6e8</trackback:ping>
      <pingback:server>http://marie.amende.no/pingback.aspx</pingback:server>
      <pingback:target>http://marie.amende.no/PermaLink,guid,b0f0ba15-debb-44a8-a0c7-acb41a50b6e8.aspx</pingback:target>
      <dc:creator>Marie Kristin Johansen</dc:creator>
      <wfw:comment>http://marie.amende.no/CommentView,guid,b0f0ba15-debb-44a8-a0c7-acb41a50b6e8.aspx</wfw:comment>
      <wfw:commentRss>http://marie.amende.no/SyndicationService.asmx/GetEntryCommentsRss?guid=b0f0ba15-debb-44a8-a0c7-acb41a50b6e8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
To be able to desploy the design created I usually end up with three basic features:
</p>
        <ul>
          <li>
MasterPageAdder: Adds the masterpages, css-files and all the needed images to the
right places on the server/solution 
</li>
          <li>
MasterPageSwitcher: Sets the default and custom masterpage file of a site to CustomMaster
in code by feature activation. 
</li>
          <li>
MasterPageStapler: Activates the MasterPageSwitcher for all created sites in the portal.</li>
        </ul>
        <p>
Here is how my project usually looks in Visual Studio:
</p>
        <p>
          <img src="http://marie.amende.no/content/binary/Amende.SharePoint.Branding.jpg" border="0" />
        </p>
        <p>
Here I have chosen to put my Custom.css file in the Layouts\styles folder where the
default css in SharePoint (Core.css) aslo are. However in some cases it might be more
valuable to put it in the Style Library so that competent users at your customer more
easaly can find and change it if nessecary. If you chose to do this you should deploy
it using the ProvisionedFiles.xml file.
</p>
        <p>
          <strong>The masterpage adder feature</strong>
        </p>
        <p>
          <font size="2">Consists of four files:</font>
        </p>
        <ul>
          <li>
Amende_dings.png: Preview image for the custom masterpage.</li>
          <li>
AmendeCustom.master: The new masterpage</li>
          <li>
ProvisionedFiles.xml: Puts the files where it belongs in the solution</li>
          <li>
feature.xml: Makes everything happen</li>
        </ul>
        <p>
The ProvisionedFiles.xml containes information abput where to find the masterpage
where to put it in the SharePoint structure (_catalogs\masterpage). It looks like
this:
</p>
        <p>
          <strong>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">&lt;?xml
version=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1.0"</span> encoding=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"utf-8"</span> ?&gt;<br />
&lt;Elements xmlns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"http://schemas.microsoft.com/sharepoint/"</span>&gt;<br />
  &lt;Module Name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"OSGMasterPages"</span> Url=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"_catalogs/masterpage"</span> Path=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"masterpage"</span> RootWebOnly=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"TRUE"</span>&gt;<br />
    &lt;File Url=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"AmendeCustom.master"</span> Type=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"GhostableInLibrary"</span>&gt;<br />
      &lt;Property Name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ContentType"</span> Value=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Custom
Master Page"</span> /&gt;<br />
      &lt;Property Name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"PublishingPreviewImage"</span> Value=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
Images/Amende_dings.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
Images/Amende_dings.png"</span> /&gt;<br />
    &lt;/File&gt;<br />
  &lt;/Module&gt;<br />
  &lt;Module Name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"PublishingLayoutsPreviewImages"</span> Url=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"_catalogs/masterpage"</span> IncludeFolders=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"??-??"</span> Path=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">""</span> RootWebOnly=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"TRUE"</span>&gt;<br />
    &lt;File Url=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Amende_dings.png"</span> Name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Preview
Images/Amende_dings.png"</span> Type=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"GhostableInLibrary"</span> /&gt;<br />
  &lt;/Module&gt;<br />
&lt;/Elements&gt;</span>
          </strong>
        </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <font face="Verdana" size="2">The
feature.xml refferences the ProvisionedFiles.xml so that the files get copied when
the feature is activated, remember to change the GUID before using the feature.xml:</font>
          </span>
        </p>
        <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <strong>&lt;?xml
version=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1.0"</span> encoding=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"utf-8"</span> ?&gt;
&lt;Feature Id=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"42141f24-8ebb-4b9e-8283-8ee6e989bcce"</span> Title=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Custom
masterpage adder"</span> Description=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Adds
the custom masterpage to masterpage gallery"</span> Version=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1.0.0.0"</span> Scope=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Site"</span> Hidden=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"False"</span> DefaultResourceFile=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"core"</span> xmlns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"http://schemas.microsoft.com/sharepoint/"</span>&gt;
&lt;ElementManifests&gt; &lt;ElementManifest Location=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ProvisionedFiles.xml"</span>/&gt;
&lt;/ElementManifests&gt; &lt;/Feature&gt;</strong>
            </span>
            <br />
          </pre>
        </span>
        <p>
          <strong>The masterpage switcher feature</strong>
        </p>
        <p>
          <font size="2">The master page switcher contains of only one file, the feature.xml:</font>
        </p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">&lt;?xml
version=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1.0"</span> encoding=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"utf-8"</span> ?&gt;
&lt;Feature Id=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"54705b7b-3293-4afa-be3f-8d53e032c6ef"</span> Title=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Activates
custom design (masterpage set to custom masterpage)"</span> Description=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Switches
masterpage to the custom masterpage by setting default master and custom master to
custom masterpage"</span> Version=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1.0.0.0"</span> Scope=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Web"</span> Hidden=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"FALSE"</span> xmlns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"http://schemas.microsoft.com/sharepoint/"</span>             ReceiverAssembly=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Amende.SharePoint.Branding,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=e39ad163a2911e63"</span>             ReceiverClass=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Amende.SharePoint.Branding.FeatureReceivers.DesignActivatorFeatureReceiver"</span>         
&gt; &lt;/Feature&gt; </span>
        </pre>
        <p>
This refferences an assembly where we can find the DesignActivatorFeatureReceiver,
to find the ReceiverAssemply and the ReceiverClass I usually use <a href="http://www.red-gate.com/products/reflector/">Lutz's
Roeders .Net Reflector</a>. Excellent tool!
</p>
        <p>
I will post the code for the feature receiver in a couple of days.
</p>
        <p>
          <strong>The master page stapler feature</strong>
        </p>
        <p>
This feature makes shure that all new sites created in the farm get the custom master
page attached. It consists of two files; the feature.xml which indicates this is a
farm feature, and an elements.xml describing what site templates are affected by this
feature. In our case this is all of them. We therefor use the term "Global". For som
strange reason the global term do not include the team site site template. We therefore
have to refference this seperately using the STS#1 definition name.
</p>
        <p>
Heres the elements.xml:
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">&lt;?xml
version=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1.0"</span> encoding=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"utf-8"</span> ?&gt;
&lt;Elements xmlns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"http://schemas.microsoft.com/sharepoint/"</span> &gt;
&lt;FeatureSiteTemplateAssociation Id=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1D8E532B-C354-43f0-89FF-10401F3C70CD"</span> TemplateName=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"GLOBAL"</span> /&gt;
&lt;FeatureSiteTemplateAssociation Id=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1D8E532B-C354-43f0-89FF-10401F3C70CD"</span> TemplateName=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"STS#1"</span> /&gt;
&lt;/Elements&gt;</span>
        </pre>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <font face="Verdana" size="2">And
here is the feature.xml file:</font>
          </span>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
          </span>
        </pre>
        <pre>
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">&lt;?xml
version=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1.0"</span> encoding=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"utf-8"</span> ?&gt;
&lt;Feature Id=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"B7685480-E85D-4cb0-A100-FB470DDE1768"</span> Title=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ActivateDesign
Feature Stapler"</span> Description=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Staples
the Master Page Activator feature to all Site Definitions (GLOBAL and SPS#1)"</span> Version=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1.0.0.0"</span> Scope=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Farm"</span> Hidden=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"FALSE"</span> xmlns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"http://schemas.microsoft.com/sharepoint/"</span>         
&gt; &lt;ElementManifests&gt; &lt;ElementManifest Location=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"elements.xml"</span>/&gt;
&lt;/ElementManifests&gt; &lt;/Feature&gt; <font face="Verdana" size="2"></font></span>
          </pre>
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <font face="Verdana" size="2">Again,
please remember to change the GUID of the feature.</font>
            </span>
          </pre>
        </pre>
        <p>
          <strong>Deploying the features</strong>
        </p>
        <p>
I am still using the old school way to deploy these features using stsadm commands
installing and activating the features. First I deploy the master page adder and test
this by checking that all of the files are where they are supposed to be. I also change
the masterpage manually to check that everything looks ok.
</p>
        <p>
Secondly I switch back to the SharePoint default master and deploy the switcher feature.
I test this by activating the feature on a number of sites.
</p>
        <p>
At last I install and activate the farm feature and test this by creating a new site.
</p>
        <img width="0" height="0" src="http://marie.amende.no/aggbug.ashx?id=b0f0ba15-debb-44a8-a0c7-acb41a50b6e8" />
      </body>
      <title>Adding design elements, switching master pages and using feature stapler to deploy design</title>
      <guid isPermaLink="false">http://marie.amende.no/PermaLink,guid,b0f0ba15-debb-44a8-a0c7-acb41a50b6e8.aspx</guid>
      <link>http://marie.amende.no/2008/09/16/AddingDesignElementsSwitchingMasterPagesAndUsingFeatureStaplerToDeployDesign.aspx</link>
      <pubDate>Tue, 16 Sep 2008 17:11:53 GMT</pubDate>
      <description>&lt;p&gt;
To be able to desploy the design created I usually end up with three basic features:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
MasterPageAdder: Adds the masterpages, css-files and all the needed images to the
right places on the server/solution 
&lt;li&gt;
MasterPageSwitcher: Sets the default and custom masterpage file of a site to CustomMaster
in code by feature activation. 
&lt;li&gt;
MasterPageStapler: Activates the MasterPageSwitcher for all created sites in the portal.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Here is how my project usually looks in Visual Studio:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://marie.amende.no/content/binary/Amende.SharePoint.Branding.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Here I have chosen to put my Custom.css file in the Layouts\styles folder where the
default css in SharePoint (Core.css) aslo are. However in some cases it might be more
valuable to put it in the Style Library so that competent users at your customer more
easaly can find and change it if nessecary. If you chose to do this you should deploy
it using the ProvisionedFiles.xml file.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;The masterpage adder feature&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=2&gt;Consists of four files:&lt;/font&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Amende_dings.png: Preview image for the custom&amp;nbsp;masterpage.&lt;/li&gt;
&lt;li&gt;
AmendeCustom.master: The new masterpage&lt;/li&gt;
&lt;li&gt;
ProvisionedFiles.xml: Puts the files where it belongs in the solution&lt;/li&gt;
&lt;li&gt;
feature.xml: Makes everything happen&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The ProvisionedFiles.xml containes information abput where to find the masterpage
where to put it in the SharePoint structure (_catalogs\masterpage). It looks like
this:
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;lt;?xml
version=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"1.0"&lt;/span&gt; encoding=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"utf-8"&lt;/span&gt; ?&amp;gt;&lt;br&gt;
&amp;lt;Elements xmlns=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"http://schemas.microsoft.com/sharepoint/"&lt;/span&gt;&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Module Name=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"OSGMasterPages"&lt;/span&gt; Url=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"_catalogs/masterpage"&lt;/span&gt; Path=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"masterpage"&lt;/span&gt; RootWebOnly=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"TRUE"&lt;/span&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;File Url=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"AmendeCustom.master"&lt;/span&gt; Type=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"GhostableInLibrary"&lt;/span&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property Name=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"ContentType"&lt;/span&gt; Value=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Custom
Master Page"&lt;/span&gt; /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property Name=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"PublishingPreviewImage"&lt;/span&gt; Value=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
Images/Amende_dings.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
Images/Amende_dings.png"&lt;/span&gt; /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/File&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/Module&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Module Name=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"PublishingLayoutsPreviewImages"&lt;/span&gt; Url=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"_catalogs/masterpage"&lt;/span&gt; IncludeFolders=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"??-??"&lt;/span&gt; Path=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;""&lt;/span&gt; RootWebOnly=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"TRUE"&lt;/span&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;File Url=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Amende_dings.png"&lt;/span&gt; Name=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Preview
Images/Amende_dings.png"&lt;/span&gt; Type=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"GhostableInLibrary"&lt;/span&gt; /&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/Module&amp;gt;&lt;br&gt;
&amp;lt;/Elements&amp;gt;&lt;/span&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana size=2&gt;The
feature.xml refferences the ProvisionedFiles.xml so that the files get copied when
the feature is activated, remember to change the GUID before using the feature.xml:&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;strong&gt;&amp;lt;?xml
version=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"1.0"&lt;/span&gt; encoding=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"utf-8"&lt;/span&gt; ?&amp;gt;
&amp;lt;Feature Id=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"42141f24-8ebb-4b9e-8283-8ee6e989bcce"&lt;/span&gt; Title=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Custom
masterpage adder"&lt;/span&gt; Description=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Adds
the custom masterpage to masterpage gallery"&lt;/span&gt; Version=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"1.0.0.0"&lt;/span&gt; Scope=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Site"&lt;/span&gt; Hidden=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"False"&lt;/span&gt; DefaultResourceFile=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"core"&lt;/span&gt; xmlns=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"http://schemas.microsoft.com/sharepoint/"&lt;/span&gt;&amp;gt;
&amp;lt;ElementManifests&amp;gt; &amp;lt;ElementManifest Location=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"ProvisionedFiles.xml"&lt;/span&gt;/&amp;gt;
&amp;lt;/ElementManifests&amp;gt; &amp;lt;/Feature&amp;gt;&lt;/strong&gt;&lt;/span&gt;
&lt;br&gt;
&lt;/pre&gt;&lt;/span&gt; 
&lt;p&gt;
&lt;strong&gt;The masterpage switcher feature&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=2&gt;The master page switcher contains of only one file, the feature.xml:&lt;/font&gt;
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;lt;?xml
version=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"1.0"&lt;/span&gt; encoding=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"utf-8"&lt;/span&gt; ?&amp;gt;
&amp;lt;Feature Id=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"54705b7b-3293-4afa-be3f-8d53e032c6ef"&lt;/span&gt; Title=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Activates
custom design (masterpage set to custom masterpage)"&lt;/span&gt; Description=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Switches
masterpage to the custom masterpage by setting default master and custom master to
custom masterpage"&lt;/span&gt; Version=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"1.0.0.0"&lt;/span&gt; Scope=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Web"&lt;/span&gt; Hidden=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"FALSE"&lt;/span&gt; xmlns=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"http://schemas.microsoft.com/sharepoint/"&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ReceiverAssembly=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Amende.SharePoint.Branding,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=e39ad163a2911e63"&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ReceiverClass=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Amende.SharePoint.Branding.FeatureReceivers.DesignActivatorFeatureReceiver"&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;gt; &amp;lt;/Feature&amp;gt; &lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
This refferences an assembly where we can find the DesignActivatorFeatureReceiver,
to find the ReceiverAssemply and the ReceiverClass I usually use &lt;a href="http://www.red-gate.com/products/reflector/"&gt;Lutz's
Roeders .Net Reflector&lt;/a&gt;. Excellent tool!
&lt;/p&gt;
&lt;p&gt;
I will post the code for the feature receiver in a couple of days.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;The master page stapler feature&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
This feature makes shure that all new sites created in the farm get the custom master
page attached. It consists of two files; the feature.xml which indicates this is a
farm feature, and an elements.xml describing what site templates are affected by this
feature. In our case this is all of them. We therefor use the term "Global". For som
strange reason the global term do not include the team site site template. We therefore
have to refference this seperately using the STS#1 definition name.
&lt;/p&gt;
&lt;p&gt;
Heres the elements.xml:
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;lt;?xml
version=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"1.0"&lt;/span&gt; encoding=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"utf-8"&lt;/span&gt; ?&amp;gt;
&amp;lt;Elements xmlns=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"http://schemas.microsoft.com/sharepoint/"&lt;/span&gt; &amp;gt;
&amp;lt;FeatureSiteTemplateAssociation Id=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"1D8E532B-C354-43f0-89FF-10401F3C70CD"&lt;/span&gt; TemplateName=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"GLOBAL"&lt;/span&gt; /&amp;gt;
&amp;lt;FeatureSiteTemplateAssociation Id=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"1D8E532B-C354-43f0-89FF-10401F3C70CD"&lt;/span&gt; TemplateName=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"STS#1"&lt;/span&gt; /&amp;gt;
&amp;lt;/Elements&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana size=2&gt;And
here is the feature.xml file:&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;
&lt;/pre&gt;&lt;pre&gt;&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;lt;?xml
version=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"1.0"&lt;/span&gt; encoding=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"utf-8"&lt;/span&gt; ?&amp;gt;
&amp;lt;Feature Id=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"B7685480-E85D-4cb0-A100-FB470DDE1768"&lt;/span&gt; Title=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"ActivateDesign
Feature Stapler"&lt;/span&gt; Description=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Staples
the Master Page Activator feature to all Site Definitions (GLOBAL and SPS#1)"&lt;/span&gt; Version=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"1.0.0.0"&lt;/span&gt; Scope=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Farm"&lt;/span&gt; Hidden=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"FALSE"&lt;/span&gt; xmlns=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"http://schemas.microsoft.com/sharepoint/"&lt;/span&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;gt; &amp;lt;ElementManifests&amp;gt; &amp;lt;ElementManifest Location=&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"elements.xml"&lt;/span&gt;/&amp;gt;
&amp;lt;/ElementManifests&amp;gt; &amp;lt;/Feature&amp;gt; &lt;font face=Verdana size=2&gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana size=2&gt;Again,
please remember to change the GUID of the feature.&lt;/font&gt;&lt;/span&gt;&gt;&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;strong&gt;Deploying the features&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
I am still using the old school way to deploy these features using stsadm commands
installing and activating the features. First I deploy the master page adder and test
this by checking that all of the files are where they are supposed to be. I also change
the masterpage manually to check that everything looks ok.
&lt;/p&gt;
&lt;p&gt;
Secondly I switch back to the SharePoint default master and deploy the switcher feature.
I test this by activating the feature on a number of sites.
&lt;/p&gt;
&lt;p&gt;
At last I install and activate the farm feature and test this by creating a new site.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://marie.amende.no/aggbug.ashx?id=b0f0ba15-debb-44a8-a0c7-acb41a50b6e8" /&gt;</description>
      <comments>http://marie.amende.no/CommentView,guid,b0f0ba15-debb-44a8-a0c7-acb41a50b6e8.aspx</comments>
      <category>Design</category>
      <category>Features</category>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://marie.amende.no/Trackback.aspx?guid=99eb2b19-884a-460b-8eea-a8a386b33a67</trackback:ping>
      <pingback:server>http://marie.amende.no/pingback.aspx</pingback:server>
      <pingback:target>http://marie.amende.no/PermaLink,guid,99eb2b19-884a-460b-8eea-a8a386b33a67.aspx</pingback:target>
      <dc:creator>Marie Kristin Johansen</dc:creator>
      <wfw:comment>http://marie.amende.no/CommentView,guid,99eb2b19-884a-460b-8eea-a8a386b33a67.aspx</wfw:comment>
      <wfw:commentRss>http://marie.amende.no/SyndicationService.asmx/GetEntryCommentsRss?guid=99eb2b19-884a-460b-8eea-a8a386b33a67</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is the first of a series of blog posts regarding deploying custom masterpages,
page layouts and css files to a SharePoint 2007 solutions. There are several other
blogposts out there conserning this very same thing but I have still not found one
addressing all of the issues I have had to solve. My travel through SP branding
land has brought me to the possition of having one SharePoint solution with several
different features that provides the new design seemlessly to your solution. This
series of posts is meant to be a walkthrough on how to do this. The solution
has been implemented on several servers and it is working without problems on all
of them. I would therefore like to share my solutions for all of you strugling with
the same issues I have come to experience during the last years.
</p>
        <p>
The first post will provide a list of all the issues my solution addresses and some
tips on how to develop a custom MasterPage with css that will not behave strangely
later on.
</p>
        <h4>List of what this solution provides
</h4>
        <ul>
          <li>
Masterpage, css and page layouts on normal portal pages  on creation (Part 1
&amp; 2) 
</li>
          <li>
Design on public and private MySite (Part 3) 
</li>
          <li>
Design on Application pages (_layouts) (part 4) 
</li>
          <li>
Custom SearchBoxEx control, so that the drop down list are over the search input
box (Part 5) 
</li>
          <li>
Custom Master page on Multipage Meeting Workspace (Part 6)</li>
        </ul>
        <h4>Creating a custom master page
</h4>
        <p>
I usually do all of my master page, page layout and css development in SharePoint
designer. I do however delete the files I have used when creating these after the
first deploy of my solution are tested and approved.
</p>
        <p>
First of all, please do not customize the default.master that you find in the _catalogs/masterpages
folder in SharePoint designer. If something goes wrong you easally want to return
to this master page, you also want to stay in supported state. Instead you should
create a new master page file and copy the contents of the default.master into this
one. I know alot of you probably will be using Heather Salomons minimal master.
I have tried doing this but not with the best result. This walkthrough would therefore
be about how I create my own minimal master. The issues I have experienced
with Heathers minimal master is that large web parts are floating out of
the page due to the lack of the boarder content place holders in the master. I always keep
all the placeholders where they are and just set them to visible="false" if I
dont use them in my design. This approach has not yet introduced any bugs
to my solutions.
</p>
        <p>
Now you should have a new masterpage with your own name. The next step will be to
 crate a css. I usually like to create this in the StyleLibrary in SharePoint
Designer to start with so that I have easy access to it. To link this new css to your
master page past the following line into your master page in the &lt;HEAD&gt; tags.
</p>
        <p>
&lt;link href="/StyleLibrary/MyCustom.css" type="text/css" rel="stylesheet" /&gt;
</p>
        <p>
It is also possible to reference your css using CSSRegistration and that should be
just as good as doing it my way. 
</p>
        <p>
Next I start stripping the colors of my MasterPage by setting all the backgroud-colors
in my css to transparent. To do this I use IE Developer Toolbar extensively to
find the css classes I need to copy from CORE.CSS and into my own MyCustom.css.
You can download the IE Dev Toolbar from here if you do not already have it:
</p>
        <p>
          <a href="http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&amp;displaylang=en</a>
        </p>
        <p>
          <br />
This might be a timeconsuming job, but remember that you just need to do it once.
Use your minimal master for all the projects in the future as well. When this is done
it is time to look at the more carectaristic design elements, such as header, footer
background colours/images, font colour/size etc.. This should be rather time
consuming, but I recomend using Heather Salomons geniuos reference chart for the css-classes
in SharePoint. This can be found here:
</p>
        <p>
          <a href="http://www.heathersolomon.com/content/sp07cssreference.htm">http://www.heathersolomon.com/content/sp07cssreference.htm</a>
        </p>
        <p>
The top banner of the page do most of the time have some kind of picture or at least
background-color. To easy apply this in my master I usually put all the tables in
the header in a new table and set the background settings on this one. Works like
charm. Hopfully you now have a well functioning custom master page. Test it by changing
to this master on one of your portal pages. In the next part of this series I will
show how this masterpage can be added to a SharePoint portal with features.
</p>
        <img width="0" height="0" src="http://marie.amende.no/aggbug.ashx?id=99eb2b19-884a-460b-8eea-a8a386b33a67" />
      </body>
      <title>Applying custom design on SharePont portals - Part 1</title>
      <guid isPermaLink="false">http://marie.amende.no/PermaLink,guid,99eb2b19-884a-460b-8eea-a8a386b33a67.aspx</guid>
      <link>http://marie.amende.no/2008/08/06/ApplyingCustomDesignOnSharePontPortalsPart1.aspx</link>
      <pubDate>Wed, 06 Aug 2008 12:34:42 GMT</pubDate>
      <description>&lt;p&gt;
This is the first of a series of blog posts regarding deploying custom masterpages,
page layouts and css files to a SharePoint 2007 solutions. There are several other
blogposts out there conserning this very same thing but I have still not found one
addressing all of the&amp;nbsp;issues I have had to solve. My travel through SP branding
land has brought me to the possition of having one SharePoint solution with several
different features that provides the new design seemlessly to your solution. This
series of posts&amp;nbsp;is meant to be a walkthrough on how to do this. The solution
has been implemented on several servers and it is working without problems on all
of them. I would therefore like to share my solutions for all of you strugling with
the same issues I have come to experience during the last years.
&lt;/p&gt;
&lt;p&gt;
The first post will provide a list of all the issues my solution addresses and&amp;nbsp;some
tips on how to develop a custom MasterPage with css that will not behave strangely
later on.
&lt;/p&gt;
&lt;h4&gt;List of what this solution provides
&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;
Masterpage, css and page layouts on normal portal pages&amp;nbsp; on creation (Part 1
&amp;amp; 2) 
&lt;li&gt;
Design on public and private MySite (Part 3) 
&lt;li&gt;
Design on Application pages (_layouts) (part 4) 
&lt;li&gt;
Custom SearchBoxEx control, so that the drop down list&amp;nbsp;are over the search input
box (Part 5) 
&lt;li&gt;
Custom Master page on Multipage Meeting Workspace (Part 6)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Creating a custom master page
&lt;/h4&gt;
&lt;p&gt;
I usually do all of my master page, page layout and css development in SharePoint
designer. I do however delete the files I have used when creating these after the
first deploy of my solution are tested and approved.
&lt;/p&gt;
&lt;p&gt;
First of all, please do not customize the default.master that you find in the _catalogs/masterpages
folder in SharePoint designer. If something goes wrong you easally want to return
to this master page, you also want to stay in supported state. Instead you should
create a new master page file and copy the contents of the default.master into this
one.&amp;nbsp;I know alot of you probably will be using Heather Salomons minimal master.
I have tried doing this but not with the best result. This walkthrough would therefore
be about how I create my&amp;nbsp;own minimal master. The&amp;nbsp;issues I have experienced
with Heathers minimal&amp;nbsp;master is&amp;nbsp;that large web parts are floating out of
the page due to the lack of the boarder content place holders in the master. I always&amp;nbsp;keep
all&amp;nbsp;the placeholders where they are and just set them to visible="false" if I
dont use&amp;nbsp;them in my design. This approach&amp;nbsp;has not yet introduced any bugs
to my solutions.
&lt;/p&gt;
&lt;p&gt;
Now you should have a new masterpage with your own name. The next step will be to
&amp;nbsp;crate a css. I usually like to create this in the StyleLibrary in SharePoint
Designer to start with so that I have easy access to it. To link this new css to your
master page past the following line into your master page in the &amp;lt;HEAD&amp;gt; tags.
&lt;/p&gt;
&lt;p&gt;
&amp;lt;link href="/StyleLibrary/MyCustom.css" type="text/css" rel="stylesheet" /&amp;gt;
&lt;/p&gt;
&lt;p&gt;
It is also possible to reference your css using CSSRegistration and that should be
just as good as doing it my way. 
&lt;/p&gt;
&lt;p&gt;
Next I start stripping the colors of my MasterPage by setting all the backgroud-colors
in my&amp;nbsp;css to transparent. To do this I use IE Developer Toolbar extensively to
find the&amp;nbsp;css classes I need to copy from CORE.CSS and into my own MyCustom.css.
You can download the IE Dev Toolbar from here if you do not already have it:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&amp;amp;displaylang=en&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;
This might be&amp;nbsp;a timeconsuming job, but remember that you just need to do it once.
Use your minimal master for all the projects in the future as well. When this is done
it is time to look at the more carectaristic design elements, such as header, footer
background colours/images, font colour/size&amp;nbsp;etc.. This should be rather time
consuming, but I recomend using Heather Salomons geniuos reference chart for the css-classes
in SharePoint. This can be found here:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.heathersolomon.com/content/sp07cssreference.htm"&gt;http://www.heathersolomon.com/content/sp07cssreference.htm&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The top banner of the page do most of the time have some kind of picture or at least
background-color. To easy apply this in my master I usually put all the tables in
the header in a new table and set the background settings on this one. Works like
charm. Hopfully you now have a well functioning custom master page. Test it by changing
to this master on one of your portal pages. In the next part of this series I will
show how this masterpage can be added to a SharePoint portal with features.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://marie.amende.no/aggbug.ashx?id=99eb2b19-884a-460b-8eea-a8a386b33a67" /&gt;</description>
      <comments>http://marie.amende.no/CommentView,guid,99eb2b19-884a-460b-8eea-a8a386b33a67.aspx</comments>
      <category>Design</category>
      <category>Features</category>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://marie.amende.no/Trackback.aspx?guid=49729287-5f2f-4798-9886-28573a253270</trackback:ping>
      <pingback:server>http://marie.amende.no/pingback.aspx</pingback:server>
      <pingback:target>http://marie.amende.no/PermaLink,guid,49729287-5f2f-4798-9886-28573a253270.aspx</pingback:target>
      <dc:creator>Marie Kristin Johansen</dc:creator>
      <wfw:comment>http://marie.amende.no/CommentView,guid,49729287-5f2f-4798-9886-28573a253270.aspx</wfw:comment>
      <wfw:commentRss>http://marie.amende.no/SyndicationService.asmx/GetEntryCommentsRss?guid=49729287-5f2f-4798-9886-28573a253270</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">First of all, welcome to my blog! 
<br /><br />
This is the first of hopefully many blog posts on this blog. The content will mainly
contain SharePoint related content. Both tecnical and more soft aspects of SharePoint
projects. Today I had my first real experience with the use of Topic Maps in SharePoint,
wich I found very interresting. I therefore thought it would be cool to share some
of the information that was brought to me. I will probably post a lot more information
on this topic when we start the implementation. 
<br /><br /><br /><p></p><img width="0" height="0" src="http://marie.amende.no/aggbug.ashx?id=49729287-5f2f-4798-9886-28573a253270" /></body>
      <title>My first post -  Discovering Topic Maps</title>
      <guid isPermaLink="false">http://marie.amende.no/PermaLink,guid,49729287-5f2f-4798-9886-28573a253270.aspx</guid>
      <link>http://marie.amende.no/2008/05/28/MyFirstPostDiscoveringTopicMaps.aspx</link>
      <pubDate>Wed, 28 May 2008 16:01:50 GMT</pubDate>
      <description>First of all, welcome to my blog! &lt;br&gt;
&lt;br&gt;
This is the first of hopefully many blog posts on this blog. The content will mainly
contain SharePoint related content. Both tecnical and more soft aspects of SharePoint
projects. Today I had my first real experience with the use of Topic Maps in SharePoint,
wich I found very interresting. I therefore thought it would be cool to share some
of the information that was brought to me. I will probably post a lot more information
on this topic when we start the implementation. 
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://marie.amende.no/aggbug.ashx?id=49729287-5f2f-4798-9886-28573a253270" /&gt;</description>
      <comments>http://marie.amende.no/CommentView,guid,49729287-5f2f-4798-9886-28573a253270.aspx</comments>
    </item>
  </channel>
</rss>