<?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>RichardSoeteman.net - Umbraco</title>
    <link>http://www.richardsoeteman.net/</link>
    <description />
    <language>en-us</language>
    <copyright>Richard Soeteman</copyright>
    <lastBuildDate>Fri, 02 Jul 2010 08:13:38 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>richard@richardsoeteman.net</managingEditor>
    <webMaster>richard@richardsoeteman.net</webMaster>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=f5052394-bab0-4c8d-afee-6a7e2827b0e3</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,f5052394-bab0-4c8d-afee-6a7e2827b0e3.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,f5052394-bab0-4c8d-afee-6a7e2827b0e3.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f5052394-bab0-4c8d-afee-6a7e2827b0e3</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Now that version 4.5 of Umbraco is out you want to make sure that your packages work
in both 4.0.x and 4.5. Or is that just me? So far I’ve had two compatibility issues
</p>
        <h3>~ prefix in UmbracoPath setting
</h3>
        <p>
I’m  using the Umbraco property GlobalSettings.Path (which correspondents with
the umbracoPath setting in the web.config file) to determine the Umbraco folder. This
used to be /Umbraco, Umbraco 4.5 supports virtual folder so it’s changed to ~/umbraco.
To solve this for both 4.0.x and 4.5 you can use the ToAbsolute method of the  <a href="http://msdn.microsoft.com/en-us/library/system.web.virtualpathutility.aspx" target="_blank">VirtualPathUtility</a> class. 
The example below will convert the virtual path ~/umbraco to absolute.
</p>
        <pre>VirtualPathUtility.ToAbsolute(umbraco.GlobalSettings.Path);</pre>
        <h3>Using inline javascript in Action class breaks the complete tree
</h3>
        <p>
In Umbraco you can create classed that implement the IAction interface which gives
you the possibility to add menu options to the context menu of a tree. In previous
versions of Umbraco you could use inline JavaScript in the JSFunctionName property
to have client side functionality. In Umbraco 4.5 the clientside model is changed
and if you include direct JavaScript into the JSFunction  name the complete tree
will break. Good thing is that <a href="http://twitter.com/Shazwazza" target="_blank">Shannon
AKA @Shazwazza</a> fixed a bug in 4.5 so the JSSource property of your action class
now actually gets rendered and you can include the function here, downside is that
this isn’t the case in 4.0 and we now need to think of a way to determine if we are
in 4.0 or 4.5. For CMSImport and MemberExport I’m using a CompatibilityHelper Class
that I’ve created. On this class I have a property SupportsJQueryTree that returns
true if the CurrentVersion setting is not 4.0. 
</p>
        <pre>
          <span style="color: #808080">/// &lt;summary&gt;</span>
          <span style="color: #808080">///
This class is introduced because 4.5 is a little bit different from 4.0.x </span>
          <span style="color: #808080">///
One single place to have nasty checks if the Umbraco environment supports a feature
or not</span>
          <span style="color: #808080">/// &lt;/summary&gt;</span>
          <span style="color: #0000ff">public</span>
          <span style="color: #0000ff">static</span>
          <span style="color: #0000ff">class</span> CompatibilityHelper
{ <span style="color: #0000ff">public</span><span style="color: #0000ff">static</span><span style="color: #0000ff">bool</span> SupportsJQueryTree
{ <span style="color: #0000ff">get</span> { <span style="color: #0000ff">return</span> !GlobalSettings.CurrentVersion.StartsWith("<span style="color: #8b0000">4.0</span>");
} } }</pre>
        <p>
Now I can determine in my action if the JQueryTree is supported and render JavaScript
for that, otherwise I will render JavaScript for the old Tree. In the snippet below
you see the Implementation that I’m using in CMSImport to start an import from a node
tree
</p>
        <pre>
          <span style="color: #0000ff">public</span>
          <span style="color: #0000ff">string</span> JsFunctionName
{ <span style="color: #0000ff">get</span> { <span style="color: #0000ff">if</span> (CompatibiltyHelper.SupportsJQueryTree)
{ <span style="color: #008000">//Environment supports the new tree call Javascript
via a function</span><span style="color: #008000">//doing this with inline script
this will cause the tree to crash</span><span style="color: #0000ff">return</span> "<span style="color: #8b0000">StartWizard()</span>";
} <span style="color: #0000ff">else</span> { <span style="color: #008000">//The old
tree could not have a function in JsSource, use inline script instead.</span><span style="color: #0000ff">return</span> "<span style="color: #8b0000"> parent.right.document.location.href
= '</span>" + umbraco.GlobalSettings.Path + "<span style="color: #8b0000">/plugins/CMSImport/Pages/wizard.aspx?id='
+ nodeID; </span>"; } } } <span style="color: #0000ff">public</span><span style="color: #0000ff">string</span> JsSource
{ <span style="color: #0000ff">get</span> { <span style="color: #0000ff">if</span> (CompatibiltyHelper.SupportsJQueryTree)
{ <span style="color: #008000">//Assign a function.</span><span style="color: #0000ff">return</span> "<span style="color: #8b0000">function
StartWizard(){ parent.right.document.location.href = '</span>" + VirtualPathUtility.ToAbsolute("<span style="color: #8b0000">/plugins/CMSImport/Pages/wizard.aspx</span>")
+ "<span style="color: #8b0000">?id=' + </span></pre>
        <pre>
          <span style="color: #8b0000">UmbClientMgr.mainTree().getActionNode().nodeId ;
}</span>"; } <span style="color: #0000ff">else</span> { <span style="color: #008000">//Doesn't
work in 4.0.x</span><span style="color: #0000ff">return</span><span style="color: #0000ff">string</span>.Empty;
} } }</pre>
        <p>
This might sound like a hack and it really is a hack. But for me this works. Within
a few months just a small percentage of the Umbraco users is using 4.0, the rest is
on 4.5 and I might drop support for 4.0 then and only need to delete this CompatibilityHelper
class and delete the old 4.0.x code  
</p>
        <p>
So far these are the only compatibility issues I’ve found (I don’t use the new schema
in my packages). If I find more I will create a separate blogpost for it. Hope this
post helps you with your compatibility issues in your packages
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=f5052394-bab0-4c8d-afee-6a7e2827b0e3" />
      </body>
      <title>Compatibility issues between 4.0.x and 4.5 for back-end developers</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,f5052394-bab0-4c8d-afee-6a7e2827b0e3.aspx</guid>
      <link>http://www.richardsoeteman.net/2010/07/02/CompatibilityIssuesBetween40xAnd45ForBackendDevelopers.aspx</link>
      <pubDate>Fri, 02 Jul 2010 08:13:38 GMT</pubDate>
      <description>&lt;p&gt;
Now that version 4.5 of Umbraco is out you want to make sure that your packages work
in both 4.0.x and 4.5. Or is that just me? So far I’ve had two compatibility issues
&lt;/p&gt;
&lt;h3&gt;~ prefix in UmbracoPath setting
&lt;/h3&gt;
&lt;p&gt;
I’m&amp;#160; using the Umbraco property GlobalSettings.Path (which correspondents with
the umbracoPath setting in the web.config file) to determine the Umbraco folder. This
used to be /Umbraco, Umbraco 4.5 supports virtual folder so it’s changed to ~/umbraco.
To solve this for both 4.0.x and 4.5 you can use the ToAbsolute method of the&amp;#160; &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.virtualpathutility.aspx" target="_blank"&gt;VirtualPathUtility&lt;/a&gt; class.&amp;#160;
The example below will convert the virtual path ~/umbraco to absolute.
&lt;/p&gt;
&lt;pre&gt;VirtualPathUtility.ToAbsolute(umbraco.GlobalSettings.Path);&lt;/pre&gt;
&lt;h3&gt;Using inline javascript in Action class breaks the complete tree
&lt;/h3&gt;
&lt;p&gt;
In Umbraco you can create classed that implement the IAction interface which gives
you the possibility to add menu options to the context menu of a tree. In previous
versions of Umbraco you could use inline JavaScript in the JSFunctionName property
to have client side functionality. In Umbraco 4.5 the clientside model is changed
and if you include direct JavaScript into the JSFunction&amp;#160; name the complete tree
will break. Good thing is that &lt;a href="http://twitter.com/Shazwazza" target="_blank"&gt;Shannon
AKA @Shazwazza&lt;/a&gt; fixed a bug in 4.5 so the JSSource property of your action class
now actually gets rendered and you can include the function here, downside is that
this isn’t the case in 4.0 and we now need to think of a way to determine if we are
in 4.0 or 4.5. For CMSImport and MemberExport I’m using a CompatibilityHelper Class
that I’ve created. On this class I have a property SupportsJQueryTree that returns
true if the CurrentVersion setting is not 4.0. 
&lt;/p&gt;
&lt;pre&gt;    &lt;span style="color: #808080"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span style="color: #808080"&gt;///
This class is introduced because 4.5 is a little bit different from 4.0.x &lt;/span&gt; &lt;span style="color: #808080"&gt;///
One single place to have nasty checks if the Umbraco environment supports a feature
or not&lt;/span&gt; &lt;span style="color: #808080"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; CompatibilityHelper
{ &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; SupportsJQueryTree
{ &lt;span style="color: #0000ff"&gt;get&lt;/span&gt; { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; !GlobalSettings.CurrentVersion.StartsWith(&amp;quot;&lt;span style="color: #8b0000"&gt;4.0&lt;/span&gt;&amp;quot;);
} } }&lt;/pre&gt;
&lt;p&gt;
Now I can determine in my action if the JQueryTree is supported and render JavaScript
for that, otherwise I will render JavaScript for the old Tree. In the snippet below
you see the Implementation that I’m using in CMSImport to start an import from a node
tree
&lt;/p&gt;
&lt;pre&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; JsFunctionName
{ &lt;span style="color: #0000ff"&gt;get&lt;/span&gt; { &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (CompatibiltyHelper.SupportsJQueryTree)
{ &lt;span style="color: #008000"&gt;//Environment supports the new tree call Javascript
via a function&lt;/span&gt; &lt;span style="color: #008000"&gt;//doing this with inline script
this will cause the tree to crash&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &amp;quot;&lt;span style="color: #8b0000"&gt;StartWizard()&lt;/span&gt;&amp;quot;;
} &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; { &lt;span style="color: #008000"&gt;//The old
tree could not have a function in JsSource, use inline script instead.&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &amp;quot;&lt;span style="color: #8b0000"&gt; parent.right.document.location.href
= '&lt;/span&gt;&amp;quot; + umbraco.GlobalSettings.Path + &amp;quot;&lt;span style="color: #8b0000"&gt;/plugins/CMSImport/Pages/wizard.aspx?id='
+ nodeID; &lt;/span&gt;&amp;quot;; } } } &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; JsSource
{ &lt;span style="color: #0000ff"&gt;get&lt;/span&gt; { &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (CompatibiltyHelper.SupportsJQueryTree)
{ &lt;span style="color: #008000"&gt;//Assign a function.&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &amp;quot;&lt;span style="color: #8b0000"&gt;function
StartWizard(){ parent.right.document.location.href = '&lt;/span&gt;&amp;quot; + VirtualPathUtility.ToAbsolute(&amp;quot;&lt;span style="color: #8b0000"&gt;/plugins/CMSImport/Pages/wizard.aspx&lt;/span&gt;&amp;quot;)
+ &amp;quot;&lt;span style="color: #8b0000"&gt;?id=' + &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style="color: #8b0000"&gt;UmbClientMgr.mainTree().getActionNode().nodeId ;
}&lt;/span&gt;&amp;quot;; } &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; { &lt;span style="color: #008000"&gt;//Doesn't
work in 4.0.x&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.Empty;
} } }&lt;/pre&gt;
&lt;p&gt;
This might sound like a hack and it really is a hack. But for me this works. Within
a few months just a small percentage of the Umbraco users is using 4.0, the rest is
on 4.5 and I might drop support for 4.0 then and only need to delete this CompatibilityHelper
class and delete the old 4.0.x code&amp;#160; 
&lt;/p&gt;
&lt;p&gt;
So far these are the only compatibility issues I’ve found (I don’t use the new schema
in my packages). If I find more I will create a separate blogpost for it. Hope this
post helps you with your compatibility issues in your packages
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=f5052394-bab0-4c8d-afee-6a7e2827b0e3" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,f5052394-bab0-4c8d-afee-6a7e2827b0e3.aspx</comments>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=32ced68a-03c7-4b1b-b06d-e366a6a5c7d6</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,32ced68a-03c7-4b1b-b06d-e366a6a5c7d6.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,32ced68a-03c7-4b1b-b06d-e366a6a5c7d6.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=32ced68a-03c7-4b1b-b06d-e366a6a5c7d6</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A few weeks back <a href="http://www.richardsoeteman.net/2010/05/28/MemberExportExport5000MembersInMillisecondsInsteadOfMinutes.aspx" target="_blank">I’ve
blogged about the new MemberExport</a> package I was working on. Today I can tell
you it’s released, both the free and the Pro (commercial) version. For those who missed
the last blogpost…. MemberExport (Pro) helps you export members from your Umbraco
installation to a csv file. The Free edition is limited to export only 200 records.
With the PRO version it’s  possible to save the export options  steps for
later use . 
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/MemberExportV1.0Released_BAF6/screenshot_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="screenshot" border="0" alt="screenshot" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/MemberExportV1.0Released_BAF6/screenshot_thumb.png" width="772" height="562" />
          </a> 
</p>
        <h3>Free Edition
</h3>
        <p>
The free edition of MemberExport can be found on <a href="http://our.umbraco.org/projects/memberexport" target="_blank">our.umbraco.org</a>.
Please vote the project up if you used and liked it.
</p>
        <h3>Pricing
</h3>
        <p>
You can buy a single domain license of MemberExport PRO. With a single domain license
you are allowed to use  MemberExport PRO  for a single domain and all subdomains,
such as www.example.com, accept.example.com, and local.example.com. We also have a
Enterprise license available. With an Enterprise license you are allowed to install
the MemberExport PRO package on unlimited production web servers, and use it for unlimited
Umbraco instances within the Enterprise. A single domain license will be available
for  <strong>39 Euro</strong>, an enterprise license for 14<strong>9 euro.  </strong>When
you buy a license you’ll get free updates within 90 days of purchase and  free
updates for all minor releases within a major release.  For example, if you purchased
a  1.0 version of MemberExport PRO, you get free updates of all 1.x versions
through our <a href="http://memberexport.soetemansoftware.nl/clientarea.aspx" target="_blank">client
area</a>. 
</p>
        <p>
          <strong>Special 1.0 offer. </strong>When you buy the 1.0 release you’ll get a free
update to 2.x. <strong>This is a 1.0 offer only!</strong></p>
        <h3>
        </h3>
        <h3>More Info
</h3>
        <p>
For more info, download, or purchase you can check out the <a href="http://memberexport.soetemansoftware.nl/" target="_blank">MemberExport</a> website
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=32ced68a-03c7-4b1b-b06d-e366a6a5c7d6" />
      </body>
      <title>MemberExport V1.0 Released</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,32ced68a-03c7-4b1b-b06d-e366a6a5c7d6.aspx</guid>
      <link>http://www.richardsoeteman.net/2010/06/07/MemberExportV10Released.aspx</link>
      <pubDate>Mon, 07 Jun 2010 11:42:40 GMT</pubDate>
      <description>&lt;p&gt;
A few weeks back &lt;a href="http://www.richardsoeteman.net/2010/05/28/MemberExportExport5000MembersInMillisecondsInsteadOfMinutes.aspx" target="_blank"&gt;I’ve
blogged about the new MemberExport&lt;/a&gt; package I was working on. Today I can tell
you it’s released, both the free and the Pro (commercial) version. For those who missed
the last blogpost…. MemberExport (Pro) helps you export members from your Umbraco
installation to a csv file. The Free edition is limited to export only 200 records.
With the PRO version it’s&amp;#160; possible to save the export options&amp;#160; steps for
later use . 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/MemberExportV1.0Released_BAF6/screenshot_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="screenshot" border="0" alt="screenshot" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/MemberExportV1.0Released_BAF6/screenshot_thumb.png" width="772" height="562" /&gt;&lt;/a&gt;&amp;#160;
&lt;/p&gt;
&lt;h3&gt;Free Edition
&lt;/h3&gt;
&lt;p&gt;
The free edition of MemberExport can be found on &lt;a href="http://our.umbraco.org/projects/memberexport" target="_blank"&gt;our.umbraco.org&lt;/a&gt;.
Please vote the project up if you used and liked it.
&lt;/p&gt;
&lt;h3&gt;Pricing
&lt;/h3&gt;
&lt;p&gt;
You can buy a single domain license of MemberExport PRO. With a single domain license
you are allowed to use&amp;#160; MemberExport PRO&amp;#160; for a single domain and all subdomains,
such as www.example.com, accept.example.com, and local.example.com. We also have a
Enterprise license available. With an Enterprise license you are allowed to install
the MemberExport PRO package on unlimited production web servers, and use it for unlimited
Umbraco instances within the Enterprise. A single domain license will be available
for&amp;#160; &lt;strong&gt;39 Euro&lt;/strong&gt;, an enterprise license for 14&lt;strong&gt;9 euro.&amp;#160; &lt;/strong&gt;When
you buy a license you’ll get free updates within 90 days of purchase and&amp;#160; free
updates for all minor releases within a major release.&amp;#160; For example, if you purchased
a&amp;#160; 1.0 version of MemberExport PRO, you get free updates of all 1.x versions
through our &lt;a href="http://memberexport.soetemansoftware.nl/clientarea.aspx" target="_blank"&gt;client
area&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Special 1.0 offer. &lt;/strong&gt;When you buy the 1.0 release you’ll get a free
update to 2.x. &lt;strong&gt;This is a 1.0 offer only!&lt;/strong&gt;
&lt;/p&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;More Info
&lt;/h3&gt;
&lt;p&gt;
For more info, download, or purchase you can check out the &lt;a href="http://memberexport.soetemansoftware.nl/" target="_blank"&gt;MemberExport&lt;/a&gt; website
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=32ced68a-03c7-4b1b-b06d-e366a6a5c7d6" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,32ced68a-03c7-4b1b-b06d-e366a6a5c7d6.aspx</comments>
      <category>MemberExport</category>
      <category>Package</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=05084656-c987-43b2-8b52-8814c888c239</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,05084656-c987-43b2-8b52-8814c888c239.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,05084656-c987-43b2-8b52-8814c888c239.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=05084656-c987-43b2-8b52-8814c888c239</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
For those who follow me on <a href="http://twitter.com/rsoeteman" target="_blank">twitter</a> probably
know that I’m working on a new package for <a href="http://umbraco.org/" target="_blank">Umbraco</a> that
can export Members to a csv file. Below you see the first screenshot of the package.
Basically you select the groups and fields you want to export, you specify the export
options and when you click the export button a csv file is generated on the fly which
you can download. 
</p>
        <p>
 <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/MemberExportexport5000membersinmilliseco_ED24/MemberExport_5.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="MemberExport" border="0" alt="MemberExport" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/MemberExportexport5000membersinmilliseco_ED24/MemberExport_thumb_1.png" width="699" height="447" /></a></p>
        <p>
Two days ago I started tweeting about this because I was very happy that exporting
a few hundred members only took 2 seconds. Immediately people warned me about the
fact that I used Member.GetAll to get a list of all the members which is very slow
when you want to export more than 500 records. Thanks again for this warning guys
(also for the brain breaking sql I had to write to improve the performance ;-)). 
So I changed the Member.GetAll functionality to a custom SQL query, imported 5000
extra records  and did a performance test to see if  the modification was
a success. Guess what, the export of <strong>5000+ records</strong> only took <strong>2142
milliseconds</strong>. I think that’s a great result to end the week with.
</p>
        <h3>
        </h3>
        <p>
        </p>
        <p>
        </p>
        <h3>When will this package be available?
</h3>
        <p>
Next Monday I will send the package to a few people that  want to beta test MemberExport.
When it’s stable enough I’ll release the package. There will be two versions of the
package, a free (limited to export 200) records version and a PRO version that can
also save the export options for later use. The price for the pro version will be
39 euro (ex 19% Dutch VAT, only for Dutch customers) . 
</p>
        <p>
I hope you find the package interesting!
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=05084656-c987-43b2-8b52-8814c888c239" />
      </body>
      <title>MemberExport export 5000+ members in milliseconds instead of minutes</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,05084656-c987-43b2-8b52-8814c888c239.aspx</guid>
      <link>http://www.richardsoeteman.net/2010/05/28/MemberExportExport5000MembersInMillisecondsInsteadOfMinutes.aspx</link>
      <pubDate>Fri, 28 May 2010 14:51:58 GMT</pubDate>
      <description>&lt;p&gt;
For those who follow me on &lt;a href="http://twitter.com/rsoeteman" target="_blank"&gt;twitter&lt;/a&gt; probably
know that I’m working on a new package for &lt;a href="http://umbraco.org/" target="_blank"&gt;Umbraco&lt;/a&gt; that
can export Members to a csv file. Below you see the first screenshot of the package.
Basically you select the groups and fields you want to export, you specify the export
options and when you click the export button a csv file is generated on the fly which
you can download. 
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/MemberExportexport5000membersinmilliseco_ED24/MemberExport_5.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="MemberExport" border="0" alt="MemberExport" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/MemberExportexport5000membersinmilliseco_ED24/MemberExport_thumb_1.png" width="699" height="447" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Two days ago I started tweeting about this because I was very happy that exporting
a few hundred members only took 2 seconds. Immediately people warned me about the
fact that I used Member.GetAll to get a list of all the members which is very slow
when you want to export more than 500 records. Thanks again for this warning guys
(also for the brain breaking sql I had to write to improve the performance ;-)).&amp;#160;
So I changed the Member.GetAll functionality to a custom SQL query, imported 5000
extra records&amp;#160; and did a performance test to see if&amp;#160; the modification was
a success. Guess what, the export of &lt;strong&gt;5000+ records&lt;/strong&gt; only took &lt;strong&gt;2142
milliseconds&lt;/strong&gt;. I think that’s a great result to end the week with.
&lt;/p&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;h3&gt;When will this package be available?
&lt;/h3&gt;
&lt;p&gt;
Next Monday I will send the package to a few people that&amp;#160; want to beta test MemberExport.
When it’s stable enough I’ll release the package. There will be two versions of the
package, a free (limited to export 200) records version and a PRO version that can
also save the export options for later use. The price for the pro version will be
39 euro (ex 19% Dutch VAT, only for Dutch customers) . 
&lt;/p&gt;
&lt;p&gt;
I hope you find the package interesting!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=05084656-c987-43b2-8b52-8814c888c239" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,05084656-c987-43b2-8b52-8814c888c239.aspx</comments>
      <category>MemberExport</category>
      <category>Package</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=7e6085b3-5a80-4cda-ae85-887828ca675a</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,7e6085b3-5a80-4cda-ae85-887828ca675a.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,7e6085b3-5a80-4cda-ae85-887828ca675a.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=7e6085b3-5a80-4cda-ae85-887828ca675a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When I released <a href="http://www.cmsimport.com/" target="_blank">CMSImport 1.0</a> two
months ago, <a href="http://www.richardsoeteman.net/2010/02/16/CMSImportPRO103Released.aspx" target="_blank">I
briefly described the FieldAdapters feature</a> that  I was going to build for
version 1.1. Today I want to go more into detail about the FieldAdapters feature for
CMSImport. 
</p>
        <h3>The problem
</h3>
        <p>
The reason I started to think about fieldadapters was because I wanted to solve a
very common problem. As you might know Umbraco only accepts three kinds of  data;
string, integer and datetime. What happens when you try to map a boolean value to 
a yes/no Umbraco datatype? An exception is thrown.  The following screenshot
contains several products that we want to import into Umbraco.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FieldAdaptersforCMSImport_D108/products_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="products" border="0" alt="products" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FieldAdaptersforCMSImport_D108/products_thumb.png" width="632" height="323" />
          </a>
        </p>
        <p>
When we’ve mapped the InStore column to a yes/no datatype the import will fail because
it can’t map the boolean value to a 0 or 1 and we will see the following ugly screen
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FieldAdaptersforCMSImport_D108/errors_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="errors" border="0" alt="errors" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FieldAdaptersforCMSImport_D108/errors_thumb.png" width="499" height="302" />
          </a> 
</p>
        <h3>And a FieldAdapter can fix that?
</h3>
        <p>
Yes a fieldadapter inspects the value and tries to parse it, in this case it will
try to pares a true/false value to 1/0, best to explain by exploring the source code.
The whole feature is based on the new IFieldAdapter interface. 
</p>
        <pre>
          <span style="color: #0000ff">using</span> System; <span style="color: #0000ff">namespace</span> CMSImportLibrary.Interfaces
{ <span style="color: #808080">/// &lt;summary&gt;</span><span style="color: #808080">///
Implement the IFieldAdapter interface to convert an mallformed field to a correct
type.</span><span style="color: #808080">/// &lt;/summary&gt;</span><span style="color: #0000ff">public</span><span style="color: #0000ff">interface</span> IFieldAdapter
{ <span style="color: #808080">/// &lt;summary&gt;</span><span style="color: #808080">///
Contains the GUID of the datatype we want to parse using this FieldAdapter</span><span style="color: #808080">///
&lt;/summary&gt;</span> Guid DataTypeId { <span style="color: #0000ff">get</span>;
} <span style="color: #808080">/// &lt;summary&gt;</span><span style="color: #808080">///
Parse the data </span><span style="color: #808080">/// &lt;/summary&gt;</span><span style="color: #808080">///
&lt;param name="value"&gt;The value to parse&lt;/param&gt;</span><span style="color: #808080">///
&lt;returns&gt;&lt;/returns&gt;</span><span style="color: #0000ff">object</span> Parse(<span style="color: #0000ff">object</span><span style="color: #0000ff">value</span>);
} }</pre>
        <p>
As you can see in the code snippet the interface contains the property DataTypeId.
The value needs to correspondent to the Id (GUID) of the datatype you are creating
the fieldadapter for. During the import a factory inspects the underlying datatype
of the document property, if a fieldadapter is found it will execute  the Parse
method. This will work on all Umbraco datatypes (also custom datatypes or datatypes
from third party packages) as long as you know the Id of the datatype. You can find
the id by opening the datatype in Umbraco, there you see the RenderControl .
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FieldAdaptersforCMSImport_D108/truefalsedatatype_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="truefalsedatatype" border="0" alt="truefalsedatatype" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FieldAdaptersforCMSImport_D108/truefalsedatatype_thumb.png" width="578" height="215" />
          </a>
        </p>
        <p>
When opening the source code of the rendercontrol you’ll see the Id of the datatype
(a GUID). Don’t worry if you can’t open the source code of the datatype i’ll add the
Id’s of all known datatypes to the documentation of CMSImport and I’ll make a free
tool that shows the Id of any datatype.
</p>
        <h3>Implementation of the BooleanFieldAdapter
</h3>
        <p>
Now enough with all the boring stuff, let’s see the fieldadapter in action. Below
you’ll see the implementation of the BooleanFieldAdapter. I’ve mapped the id of the
True/false datatype to the DataTypeId property so CMSImport knows that it needs to
call the Parse method during the mapping of a yes/no document property. In the Parse
method I simply check if the value is already in the correct format , if not it will
try to convert the value to 1 or 0 and return that , otherwise it will just return
the original value.
</p>
        <pre>
          <span style="color: #0000ff">using</span> System; <span style="color: #0000ff">using</span> CMSImportLibrary.Interfaces; <span style="color: #0000ff">namespace</span> CMSImportLibrary.FieldAdapters.DefaultFieldAdapters
{ <span style="color: #0000ff">public</span><span style="color: #0000ff">class</span> BooleanFieldAdapter
: IFieldAdapter { #region IFieldAdapter Members <span style="color: #0000ff">public</span> Guid
DataTypeId { <span style="color: #0000ff">get</span> { <span style="color: #0000ff">return</span><span style="color: #0000ff">new</span> Guid("<span style="color: #8b0000">38b352c1-e9f8-4fd8-9324-9a2eab06d97a</span>");
} } <span style="color: #0000ff">public</span><span style="color: #0000ff">object</span> Parse(<span style="color: #0000ff">object</span><span style="color: #0000ff">value</span>)
{ <span style="color: #0000ff">if</span> (!(<span style="color: #0000ff">value</span>.Equals("<span style="color: #8b0000">0</span>")
|| <span style="color: #0000ff">value</span>.Equals("<span style="color: #8b0000">1</span>")))
{ <span style="color: #0000ff">bool</span> boolValue = <span style="color: #0000ff">false</span>; <span style="color: #0000ff">if</span> (<span style="color: #0000ff">bool</span>.TryParse(<span style="color: #0000ff">value</span>.ToString(), <span style="color: #0000ff">out</span> boolValue))
{ <span style="color: #0000ff">return</span> boolValue ? 1 : 0; } } <span style="color: #0000ff">return</span><span style="color: #0000ff">value</span>;
} #endregion } }</pre>
        <p>
Now when we run the import  again it will just import the data without any errors,
just by adding a few lines of code, isn’t that powerful? 
</p>
        <h3>Beyond fixing problems
</h3>
        <p>
        </p>
        <p>
        </p>
        <p>
Now that we have this mechanism we can also use it to modify data during the import.
Let’s say we import a piece of content from an old site that contains an image tag.
This will just run fine but when you have a reference to an image on your old site
and  you delete that old site all the references to the images are dead. FieldAdapters
can help solve this issue by inspecting the text, extract the image tags, import these
images into the media library and update the image tag with a reference to the media
item. This will really help keep your site consistent. The same applies for Upload
fields.
</p>
        <h3>Will all of this be included in the free version of CMSImport also?
</h3>
        <p>
All FieldAdapters that fix errors (Like the BooleanFieldAdapter) will be included
into the free version of CMSImport. FieldAdapters that helps you updating the content
will only be included in the PRO version of CMSImport. And again you can also create
your own FieldAdapters, free for both versions. 
</p>
        <p>
This will be the major feature of the V1.1 release of CMSImport. Please let me know
what you think about this feature.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=7e6085b3-5a80-4cda-ae85-887828ca675a" />
      </body>
      <title>FieldAdapters for CMSImport</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,7e6085b3-5a80-4cda-ae85-887828ca675a.aspx</guid>
      <link>http://www.richardsoeteman.net/2010/04/16/FieldAdaptersForCMSImport.aspx</link>
      <pubDate>Fri, 16 Apr 2010 13:09:04 GMT</pubDate>
      <description>&lt;p&gt;
When I released &lt;a href="http://www.cmsimport.com/" target="_blank"&gt;CMSImport 1.0&lt;/a&gt; two
months ago, &lt;a href="http://www.richardsoeteman.net/2010/02/16/CMSImportPRO103Released.aspx" target="_blank"&gt;I
briefly described the FieldAdapters feature&lt;/a&gt; that&amp;#160; I was going to build for
version 1.1. Today I want to go more into detail about the FieldAdapters feature for
CMSImport. 
&lt;/p&gt;
&lt;h3&gt;The problem
&lt;/h3&gt;
&lt;p&gt;
The reason I started to think about fieldadapters was because I wanted to solve a
very common problem. As you might know Umbraco only accepts three kinds of&amp;#160; data;
string, integer and datetime. What happens when you try to map a boolean value to&amp;#160;
a yes/no Umbraco datatype? An exception is thrown.&amp;#160; The following screenshot
contains several products that we want to import into Umbraco.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FieldAdaptersforCMSImport_D108/products_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="products" border="0" alt="products" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FieldAdaptersforCMSImport_D108/products_thumb.png" width="632" height="323" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
When we’ve mapped the InStore column to a yes/no datatype the import will fail because
it can’t map the boolean value to a 0 or 1 and we will see the following ugly screen
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FieldAdaptersforCMSImport_D108/errors_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="errors" border="0" alt="errors" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FieldAdaptersforCMSImport_D108/errors_thumb.png" width="499" height="302" /&gt;&lt;/a&gt;&amp;#160;
&lt;/p&gt;
&lt;h3&gt;And a FieldAdapter can fix that?
&lt;/h3&gt;
&lt;p&gt;
Yes a fieldadapter inspects the value and tries to parse it, in this case it will
try to pares a true/false value to 1/0, best to explain by exploring the source code.
The whole feature is based on the new IFieldAdapter interface. 
&lt;/p&gt;
&lt;pre&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System; &lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; CMSImportLibrary.Interfaces
{ &lt;span style="color: #808080"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span style="color: #808080"&gt;///
Implement the IFieldAdapter interface to convert an mallformed field to a correct
type.&lt;/span&gt; &lt;span style="color: #808080"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;interface&lt;/span&gt; IFieldAdapter
{ &lt;span style="color: #808080"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span style="color: #808080"&gt;///
Contains the GUID of the datatype we want to parse using this FieldAdapter&lt;/span&gt; &lt;span style="color: #808080"&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt; Guid DataTypeId { &lt;span style="color: #0000ff"&gt;get&lt;/span&gt;;
} &lt;span style="color: #808080"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span style="color: #808080"&gt;///
Parse the data &lt;/span&gt; &lt;span style="color: #808080"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span style="color: #808080"&gt;///
&amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;The value to parse&amp;lt;/param&amp;gt;&lt;/span&gt; &lt;span style="color: #808080"&gt;///
&amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; Parse(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);
} }&lt;/pre&gt;
&lt;p&gt;
As you can see in the code snippet the interface contains the property DataTypeId.
The value needs to correspondent to the Id (GUID) of the datatype you are creating
the fieldadapter for. During the import a factory inspects the underlying datatype
of the document property, if a fieldadapter is found it will execute&amp;#160; the Parse
method. This will work on all Umbraco datatypes (also custom datatypes or datatypes
from third party packages) as long as you know the Id of the datatype. You can find
the id by opening the datatype in Umbraco, there you see the RenderControl .
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FieldAdaptersforCMSImport_D108/truefalsedatatype_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="truefalsedatatype" border="0" alt="truefalsedatatype" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FieldAdaptersforCMSImport_D108/truefalsedatatype_thumb.png" width="578" height="215" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
When opening the source code of the rendercontrol you’ll see the Id of the datatype
(a GUID). Don’t worry if you can’t open the source code of the datatype i’ll add the
Id’s of all known datatypes to the documentation of CMSImport and I’ll make a free
tool that shows the Id of any datatype.
&lt;/p&gt;
&lt;h3&gt;Implementation of the BooleanFieldAdapter
&lt;/h3&gt;
&lt;p&gt;
Now enough with all the boring stuff, let’s see the fieldadapter in action. Below
you’ll see the implementation of the BooleanFieldAdapter. I’ve mapped the id of the
True/false datatype to the DataTypeId property so CMSImport knows that it needs to
call the Parse method during the mapping of a yes/no document property. In the Parse
method I simply check if the value is already in the correct format , if not it will
try to convert the value to 1 or 0 and return that , otherwise it will just return
the original value.
&lt;/p&gt;
&lt;pre&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; CMSImportLibrary.Interfaces; &lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; CMSImportLibrary.FieldAdapters.DefaultFieldAdapters
{ &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; BooleanFieldAdapter
: IFieldAdapter { #region IFieldAdapter Members &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Guid
DataTypeId { &lt;span style="color: #0000ff"&gt;get&lt;/span&gt; { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Guid(&amp;quot;&lt;span style="color: #8b0000"&gt;38b352c1-e9f8-4fd8-9324-9a2eab06d97a&lt;/span&gt;&amp;quot;);
} } &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; Parse(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;)
{ &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (!(&lt;span style="color: #0000ff"&gt;value&lt;/span&gt;.Equals(&amp;quot;&lt;span style="color: #8b0000"&gt;0&lt;/span&gt;&amp;quot;)
|| &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;.Equals(&amp;quot;&lt;span style="color: #8b0000"&gt;1&lt;/span&gt;&amp;quot;)))
{ &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; boolValue = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;.TryParse(&lt;span style="color: #0000ff"&gt;value&lt;/span&gt;.ToString(), &lt;span style="color: #0000ff"&gt;out&lt;/span&gt; boolValue))
{ &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; boolValue ? 1 : 0; } } &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;
} #endregion } }&lt;/pre&gt;
&lt;p&gt;
Now when we run the import&amp;#160; again it will just import the data without any errors,
just by adding a few lines of code, isn’t that powerful? 
&lt;/p&gt;
&lt;h3&gt;Beyond fixing problems
&lt;/h3&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Now that we have this mechanism we can also use it to modify data during the import.
Let’s say we import a piece of content from an old site that contains an image tag.
This will just run fine but when you have a reference to an image on your old site
and&amp;#160; you delete that old site all the references to the images are dead. FieldAdapters
can help solve this issue by inspecting the text, extract the image tags, import these
images into the media library and update the image tag with a reference to the media
item. This will really help keep your site consistent. The same applies for Upload
fields.
&lt;/p&gt;
&lt;h3&gt;Will all of this be included in the free version of CMSImport also?
&lt;/h3&gt;
&lt;p&gt;
All FieldAdapters that fix errors (Like the BooleanFieldAdapter) will be included
into the free version of CMSImport. FieldAdapters that helps you updating the content
will only be included in the PRO version of CMSImport. And again you can also create
your own FieldAdapters, free for both versions. 
&lt;/p&gt;
&lt;p&gt;
This will be the major feature of the V1.1 release of CMSImport. Please let me know
what you think about this feature.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=7e6085b3-5a80-4cda-ae85-887828ca675a" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,7e6085b3-5a80-4cda-ae85-887828ca675a.aspx</comments>
      <category>CMSImport</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=614c2da5-0922-45b0-9d8a-d1224a2de7a3</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,614c2da5-0922-45b0-9d8a-d1224a2de7a3.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,614c2da5-0922-45b0-9d8a-d1224a2de7a3.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=614c2da5-0922-45b0-9d8a-d1224a2de7a3</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
With Taskscheduler you can schedule url's/pages to be executed on a certain date and
time. It’s a simplified version of the Windows task scheduler, build on top of the
Umbraco scheduler functionality. If you’ve used  <a href="http://www.cmsimport.com/" target="_blank">CMSImport
PRO</a>, the package should look familiar because TaskScheduler is based on the scheduled
import functionality of CMSImport PRO.  When you installed the package and browse
to the developer section you’ll notice the new Scheduled Tasks tree. From here you
can create new Scheduled tasks, or browse to existing ones. 
</p>
        <h3>Schedule a task
</h3>
        <p>
When you create a scheduled task, you’ll see the following screen. In this screen
you can configure the scheduled task. 
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/TaskSchedulerpackagereleased_C813/TaskScheduler_6.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="TaskScheduler" border="0" alt="TaskScheduler" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/TaskSchedulerpackagereleased_C813/TaskScheduler_thumb_2.png" width="712" height="605" />
          </a>
        </p>
        <p>
The scheduled task name contains the name of the scheduled task. This will also be
shown in the tree and you can use this in the notification email template.
</p>
        <p>
The Schedule Url contains the url that you want to execute. You can insert a full
url (<a href="http://mydemosite.com/scheduledpage.aspx">http://mydemosite.com/scheduledpage.aspx</a>),
an absolute path(/scheduledpage.aspx) or a relative path(~/scheduledpage.aspx). The
last option will come handy when you start working with Umbraco 4.1 where virtual
folders are supported. When you want to retrieve the HTTP output of the page and use
that in your notify email you can set the url output to true.
</p>
        <p>
If you want to retrieve a notification email that tells you the scheduled task has
executed you can fill in your emailaddress in the notify emailaddress field. 
</p>
        <p>
Basically you’ll have three options 
</p>
        <ul>
          <li>
Execute every week on certain days and a certain time. 
</li>
          <li>
Execute every day on a certain time 
</li>
          <li>
Execute every hour 
</li>
        </ul>
        <h3>Settings
</h3>
        <p>
Not a lot of settings to configure. Only the settings for the notification email.
You can configure the from address, the subject  and the email template. In the
email template you can use two tags. 
</p>
        <ul>
          <li>
[#Taskname]. Will be replaced with the name of the configured task 
</li>
          <li>
[#Output] . Will be replaced with the html that got returned from the page if you
had checked “Use Url output in url”. 
</li>
        </ul>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/TaskSchedulerpackagereleased_C813/taskschedulersettings_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="taskschedulersettings" border="0" alt="taskschedulersettings" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/TaskSchedulerpackagereleased_C813/taskschedulersettings_thumb.png" width="1025" height="441" />
          </a>
        </p>
        <h3>System Requirements
</h3>
        <p>
TaskScheduler is tested on Umbraco 4.0.3.1, is compatible with .NET Framework 2.0 
and is compatible with SQL Server(Express) 2005, 2008.
</p>
        <h3>Download
</h3>
        <p>
You can <a href="http://our.umbraco.org/projects/taskscheduler" target="_blank">download
the package</a> from <a href="http://our.umbraco.org/" target="_blank">our.umbraco.org</a></p>
        <p>
As always I hope that you like the package and it’s useful for you. 
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=614c2da5-0922-45b0-9d8a-d1224a2de7a3" />
      </body>
      <title>TaskScheduler package released</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,614c2da5-0922-45b0-9d8a-d1224a2de7a3.aspx</guid>
      <link>http://www.richardsoeteman.net/2010/04/04/TaskSchedulerPackageReleased.aspx</link>
      <pubDate>Sun, 04 Apr 2010 18:22:10 GMT</pubDate>
      <description>&lt;p&gt;
With Taskscheduler you can schedule url's/pages to be executed on a certain date and
time. It’s a simplified version of the Windows task scheduler, build on top of the
Umbraco scheduler functionality. If you’ve used&amp;#160; &lt;a href="http://www.cmsimport.com/" target="_blank"&gt;CMSImport
PRO&lt;/a&gt;, the package should look familiar because TaskScheduler is based on the scheduled
import functionality of CMSImport PRO.&amp;#160; When you installed the package and browse
to the developer section you’ll notice the new Scheduled Tasks tree. From here you
can create new Scheduled tasks, or browse to existing ones. 
&lt;/p&gt;
&lt;h3&gt;Schedule a task
&lt;/h3&gt;
&lt;p&gt;
When you create a scheduled task, you’ll see the following screen. In this screen
you can configure the scheduled task. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/TaskSchedulerpackagereleased_C813/TaskScheduler_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="TaskScheduler" border="0" alt="TaskScheduler" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/TaskSchedulerpackagereleased_C813/TaskScheduler_thumb_2.png" width="712" height="605" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The scheduled task name contains the name of the scheduled task. This will also be
shown in the tree and you can use this in the notification email template.
&lt;/p&gt;
&lt;p&gt;
The Schedule Url contains the url that you want to execute. You can insert a full
url (&lt;a href="http://mydemosite.com/scheduledpage.aspx"&gt;http://mydemosite.com/scheduledpage.aspx&lt;/a&gt;),
an absolute path(/scheduledpage.aspx) or a relative path(~/scheduledpage.aspx). The
last option will come handy when you start working with Umbraco 4.1 where virtual
folders are supported. When you want to retrieve the HTTP output of the page and use
that in your notify email you can set the url output to true.
&lt;/p&gt;
&lt;p&gt;
If you want to retrieve a notification email that tells you the scheduled task has
executed you can fill in your emailaddress in the notify emailaddress field. 
&lt;/p&gt;
&lt;p&gt;
Basically you’ll have three options 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Execute every week on certain days and a certain time. 
&lt;/li&gt;
&lt;li&gt;
Execute every day on a certain time 
&lt;/li&gt;
&lt;li&gt;
Execute every hour 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Settings
&lt;/h3&gt;
&lt;p&gt;
Not a lot of settings to configure. Only the settings for the notification email.
You can configure the from address, the subject&amp;#160; and the email template. In the
email template you can use two tags. 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
[#Taskname]. Will be replaced with the name of the configured task 
&lt;/li&gt;
&lt;li&gt;
[#Output] . Will be replaced with the html that got returned from the page if you
had checked “Use Url output in url”. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/TaskSchedulerpackagereleased_C813/taskschedulersettings_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="taskschedulersettings" border="0" alt="taskschedulersettings" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/TaskSchedulerpackagereleased_C813/taskschedulersettings_thumb.png" width="1025" height="441" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;h3&gt;System Requirements
&lt;/h3&gt;
&lt;p&gt;
TaskScheduler is tested on Umbraco 4.0.3.1, is compatible with .NET Framework 2.0&amp;#160;
and is compatible with SQL Server(Express) 2005, 2008.
&lt;/p&gt;
&lt;h3&gt;Download
&lt;/h3&gt;
&lt;p&gt;
You can &lt;a href="http://our.umbraco.org/projects/taskscheduler" target="_blank"&gt;download
the package&lt;/a&gt; from &lt;a href="http://our.umbraco.org/" target="_blank"&gt;our.umbraco.org&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
As always I hope that you like the package and it’s useful for you. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=614c2da5-0922-45b0-9d8a-d1224a2de7a3" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,614c2da5-0922-45b0-9d8a-d1224a2de7a3.aspx</comments>
      <category>Package</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=c744a615-af88-44f4-871d-531f66b16a85</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,c744a615-af88-44f4-871d-531f66b16a85.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,c744a615-af88-44f4-871d-531f66b16a85.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=c744a615-af88-44f4-871d-531f66b16a85</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Apart from developing client websites,  writing a manual for CMSImport and 
developing CMSImport V1.1 I’ve started the development of SiteAnalyzer last week. 
In the coming blogposts about SiteAnalyzer I will describe the development process
of this package.
</p>
        <h3>What is SiteAnalyzer?
</h3>
        <p>
SiteAnalyzer is tool that checks published pages for broken links, broken images in
both content and Templates/ XSLT/Usercontrols. In next versions of SiteAnalyzer it
will check more and more. My goal is to check for every SEO rule which you can turn
on/off.  It will be using a plugin architecture so you can add custom rules.
SiteAnalyzer will report back pages where the rules failed to validate, like the Link
failed due a 404 etc. 
</p>
        <p>
Now I hear you think, “Tools like these already exist why develop your own?”". 
I have a few reasons for that, first I was not finished and second I think integrating
such a tool into Umbraco is better so people can maintain their site through one interface
instead of having a tool for everything. This is why the <a href="http://our.umbraco.org/projects/google-analytics-for-umbraco">Google
Analytics package for Umbraco</a> is so popular.
</p>
        <p>
Again I was not finished. The killer feature of SiteAnalyzer will be the <strong>auto
repair</strong> functionality(only for content) . Best to explain by an example. Let’s
say the content editor entered the url  “www.umbraco.org” in the Rich Text editor.
The validator will fail due a 404 page not found. The auto repair function will try
to fix the url and in this example it will convert “www.umbraco.org” to “http://www.umbraco.org/”
So instead of just reporting that a url failed to validate, it will report that it
found a link that failed and repaired it for you, which saves you a few clicks.
</p>
        <h3>
        </h3>
        <h3>Will SiteAnalyzer be open source?
</h3>
        <p>
No just as CMSImport  SiteAnalyzer comes in two editions, standard (free) and
a PRO commercial edition. The difference between standard and pro will be that the
standard edition can handle only a certain amount of pages, the Pro version can be
scheduled instead of manual start of the scan and the Pro version comes with advanced
reporting which sends you a pdf after it executed.
</p>
        <h3>When will we see a first release?
</h3>
        <p>
A first Preview release will be on our.umbraco.org in Q2,  before Codegarden.
The first preview will focus on the Standard functionality.
</p>
        <p>
The next blogpost will describe the architecture of this package.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=c744a615-af88-44f4-871d-531f66b16a85" />
      </body>
      <title>Developing SiteAnalyzer</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,c744a615-af88-44f4-871d-531f66b16a85.aspx</guid>
      <link>http://www.richardsoeteman.net/2010/03/26/DevelopingSiteAnalyzer.aspx</link>
      <pubDate>Fri, 26 Mar 2010 22:53:02 GMT</pubDate>
      <description>&lt;p&gt;
Apart from developing client websites,&amp;#160; writing a manual for CMSImport and&amp;#160;
developing CMSImport V1.1 I’ve started the development of SiteAnalyzer last week.&amp;#160;
In the coming blogposts about SiteAnalyzer I will describe the development process
of this package.
&lt;/p&gt;
&lt;h3&gt;What is SiteAnalyzer?
&lt;/h3&gt;
&lt;p&gt;
SiteAnalyzer is tool that checks published pages for broken links, broken images in
both content and Templates/ XSLT/Usercontrols. In next versions of SiteAnalyzer it
will check more and more. My goal is to check for every SEO rule which you can turn
on/off.&amp;#160; It will be using a plugin architecture so you can add custom rules.
SiteAnalyzer will report back pages where the rules failed to validate, like the Link
failed due a 404 etc. 
&lt;/p&gt;
&lt;p&gt;
Now I hear you think, “Tools like these already exist why develop your own?”&amp;quot;.&amp;#160;
I have a few reasons for that, first I was not finished and second I think integrating
such a tool into Umbraco is better so people can maintain their site through one interface
instead of having a tool for everything. This is why the &lt;a href="http://our.umbraco.org/projects/google-analytics-for-umbraco"&gt;Google
Analytics package for Umbraco&lt;/a&gt; is so popular.
&lt;/p&gt;
&lt;p&gt;
Again I was not finished. The killer feature of SiteAnalyzer will be the &lt;strong&gt;auto
repair&lt;/strong&gt; functionality(only for content) . Best to explain by an example. Let’s
say the content editor entered the url&amp;#160; “www.umbraco.org” in the Rich Text editor.
The validator will fail due a 404 page not found. The auto repair function will try
to fix the url and in this example it will convert “www.umbraco.org” to “http://www.umbraco.org/”
So instead of just reporting that a url failed to validate, it will report that it
found a link that failed and repaired it for you, which saves you a few clicks.
&lt;/p&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;Will SiteAnalyzer be open source?
&lt;/h3&gt;
&lt;p&gt;
No just as CMSImport&amp;#160; SiteAnalyzer comes in two editions, standard (free) and
a PRO commercial edition. The difference between standard and pro will be that the
standard edition can handle only a certain amount of pages, the Pro version can be
scheduled instead of manual start of the scan and the Pro version comes with advanced
reporting which sends you a pdf after it executed.
&lt;/p&gt;
&lt;h3&gt;When will we see a first release?
&lt;/h3&gt;
&lt;p&gt;
A first Preview release will be on our.umbraco.org in Q2,&amp;#160; before Codegarden.
The first preview will focus on the Standard functionality.
&lt;/p&gt;
&lt;p&gt;
The next blogpost will describe the architecture of this package.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=c744a615-af88-44f4-871d-531f66b16a85" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,c744a615-af88-44f4-871d-531f66b16a85.aspx</comments>
      <category>SiteAnalyzer</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=774c6b8f-d413-4419-8d91-7ac47b59e7bc</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,774c6b8f-d413-4419-8d91-7ac47b59e7bc.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,774c6b8f-d413-4419-8d91-7ac47b59e7bc.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=774c6b8f-d413-4419-8d91-7ac47b59e7bc</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently I’ve developed a rather large website for a customer. To make the structure
as simple as possible to understand I like to use different Icons for each document
type. I was very happy with the <a href="http://our.umbraco.org/projects/famfamfam-icons">FamFamFam
Icons</a> project from The Farm. After Installing this I got another challenge and
that was to pick the right Icon.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SelectIconsforadoctype_B7BE/iconspng_2.png">
            <img title="iconspng" style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="523" alt="iconspng" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SelectIconsforadoctype_B7BE/iconspng_thumb.png" width="481" border="0" />
          </a>  
</p>
        <p>
        </p>
        <p>
Today I started working on a new project, installed the FamFamFam Icons package again
and thought that it would be better to assign document types to the Image instead
of assigning the image to a document type. I’ve created a small Usercontrol that lists
all the icons (except for the default Umbraco sprites). Next to the Icon you find 
a dropdown with the possible documenttypes which you can select.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SelectIconsforadoctype_B7BE/selecticon_2.png">
            <img title="selecticon" style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="463" alt="selecticon" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SelectIconsforadoctype_B7BE/selecticon_thumb.png" width="703" border="0" />
          </a>
        </p>
        <p>
I did not create a package out of this. It’s working for me, but it needs some improvements
before I can add it to <a href="http://our.umbraco.org/">our.umbraco.org</a>. 
Maybe that  will never happen, so attached you find a zip file. Add the IconPickerDashboard.dll
file to your bin folder, the IconPickerDashboard.ascx to your usercontrol folder.
</p>
        <p>
Add the following section to your  the Dashboard.config file.
</p>
        <pre>
          <span style="COLOR: #0000ff">&lt;</span>
          <span style="COLOR: #800000">section</span>
          <span style="COLOR: #0000ff">&gt;</span>
          <span style="COLOR: #0000ff">&lt;</span>
          <span style="COLOR: #800000">areas</span>
          <span style="COLOR: #0000ff">&gt;</span>
          <span style="COLOR: #0000ff">&lt;</span>
          <span style="COLOR: #800000">area</span>
          <span style="COLOR: #0000ff">&gt;</span>settings<span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">area</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">areas</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">tab</span><span style="COLOR: #ff0000">caption</span>=<span style="COLOR: #0000ff">"IconPicker"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">control</span><span style="COLOR: #0000ff">&gt;</span>/usercontrols/IconPickerDashboard.ascx<span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">control</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">tab</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">section</span><span style="COLOR: #0000ff">&gt;</span></pre>
        <p>
Now browse to the settings section and select the icons you like.
</p>
        <p>
Download the zip (Requires .net 3.5).
</p>
        <div class="wlWriterEditableSmartContent" id="scid:8eb9d37f-1541-4f29-b6f4-1eea890d4876:b8d74c35-1ba0-4abe-b59b-4bd4ac2dbe38" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px">
          <p>
          </p>
          <div>
            <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SelectIconsforadoctype_B7BE/IconPickerDashboard_1.zip" target="_blank">IconPickerDashboard.zip</a>
          </div>
          <p>
          </p>
        </div>
        <p>
Or download the source:
</p>
        <div class="wlWriterEditableSmartContent" id="scid:8eb9d37f-1541-4f29-b6f4-1eea890d4876:1a2f0475-b876-4f3a-9438-869d532a008e" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px">
          <p>
          </p>
          <div>
            <a href="http://www.richardsoeteman.net/ct.ashx?id=774c6b8f-d413-4419-8d91-7ac47b59e7bc&amp;url=http%3a%2f%2fwww.richardsoeteman.net%2fcontent%2fbinary%2fWindowsLiveWriter%2fSelectIconsforadoctype_B7BE%2fIconPickerDashboard_source_1.zip" target="_self">IconPickerDashboard_source.zip</a>
          </div>
          <p>
          </p>
        </div>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=774c6b8f-d413-4419-8d91-7ac47b59e7bc" />
      </body>
      <title>Select Icons for a document type</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,774c6b8f-d413-4419-8d91-7ac47b59e7bc.aspx</guid>
      <link>http://www.richardsoeteman.net/2010/03/08/SelectIconsForADocumentType.aspx</link>
      <pubDate>Mon, 08 Mar 2010 12:48:25 GMT</pubDate>
      <description>&lt;p&gt;
Recently I’ve developed a rather large website for a customer. To make the structure
as simple as possible to understand I like to use different Icons for each document
type. I was very happy with the &lt;a href="http://our.umbraco.org/projects/famfamfam-icons"&gt;FamFamFam
Icons&lt;/a&gt; project from The Farm. After Installing this I got another challenge and
that was to pick the right Icon.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SelectIconsforadoctype_B7BE/iconspng_2.png"&gt;&lt;img title=iconspng style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=523 alt=iconspng src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SelectIconsforadoctype_B7BE/iconspng_thumb.png" width=481 border=0&gt;&lt;/a&gt;&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Today I started working on a new project, installed the FamFamFam Icons package again
and thought that it would be better to assign document types to the Image instead
of assigning the image to a document type. I’ve created a small Usercontrol that lists
all the icons (except for the default Umbraco sprites). Next to the Icon you find&amp;nbsp;
a dropdown with the possible documenttypes which you can select.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SelectIconsforadoctype_B7BE/selecticon_2.png"&gt;&lt;img title=selecticon style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=463 alt=selecticon src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SelectIconsforadoctype_B7BE/selecticon_thumb.png" width=703 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I did not create a package out of this. It’s working for me, but it needs some improvements
before I can add it to &lt;a href="http://our.umbraco.org/"&gt;our.umbraco.org&lt;/a&gt;.&amp;nbsp;
Maybe that&amp;nbsp; will never happen, so attached you find a zip file. Add the IconPickerDashboard.dll
file to your bin folder, the IconPickerDashboard.ascx to your usercontrol folder.
&lt;/p&gt;
&lt;p&gt;
Add the following section to your&amp;nbsp; the Dashboard.config file.
&lt;/p&gt;
&lt;pre&gt;    &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;section&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;areas&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;area&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;settings&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;area&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;areas&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;tab&lt;/span&gt; &lt;span style="COLOR: #ff0000"&gt;caption&lt;/span&gt;=&lt;span style="COLOR: #0000ff"&gt;"IconPicker"&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;control&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;/usercontrols/IconPickerDashboard.ascx&lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;control&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;tab&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #800000"&gt;section&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
Now browse to the settings section and select the icons you like.
&lt;/p&gt;
&lt;p&gt;
Download the zip (Requires .net 3.5).
&lt;/p&gt;
&lt;div class=wlWriterEditableSmartContent id=scid:8eb9d37f-1541-4f29-b6f4-1eea890d4876:b8d74c35-1ba0-4abe-b59b-4bd4ac2dbe38 style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;
&lt;p&gt;
&lt;div&gt;&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SelectIconsforadoctype_B7BE/IconPickerDashboard_1.zip" target=_blank&gt;IconPickerDashboard.zip&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Or download the source:
&lt;/p&gt;
&lt;div class=wlWriterEditableSmartContent id=scid:8eb9d37f-1541-4f29-b6f4-1eea890d4876:1a2f0475-b876-4f3a-9438-869d532a008e style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;
&lt;p&gt;
&lt;div&gt;&lt;a href="http://www.richardsoeteman.net/ct.ashx?id=774c6b8f-d413-4419-8d91-7ac47b59e7bc&amp;amp;url=http%3a%2f%2fwww.richardsoeteman.net%2fcontent%2fbinary%2fWindowsLiveWriter%2fSelectIconsforadoctype_B7BE%2fIconPickerDashboard_source_1.zip" target=_self&gt;IconPickerDashboard_source.zip&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=774c6b8f-d413-4419-8d91-7ac47b59e7bc" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,774c6b8f-d413-4419-8d91-7ac47b59e7bc.aspx</comments>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=90ffa866-c315-42be-9d32-bcf85c20e6bd</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,90ffa866-c315-42be-9d32-bcf85c20e6bd.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,90ffa866-c315-42be-9d32-bcf85c20e6bd.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=90ffa866-c315-42be-9d32-bcf85c20e6bd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’m very pleased to announce that CMSImport 1.0.3 is released. Now I can hear you
think CMSImport? Must be a fork of the great UmbImport package. No this isn’t the
case. A few weeks back Niels (AKA @Umbraco) asked me to change the name since <a title="Umbraco" href="http://www.umbraco.org." target="_blank">Umbraco</a> HQ
got a lot of requests about this package. So now the name is CMSImport and that’s
not going to change anymore.
</p>
        <h3>CMSImport PRO
</h3>
        <p>
Finally we’ve finished our commercial edition of CMSImport.  CMSImport PRO gives
you all the options of the default package and the following extra features: 
</p>
        <ul>
          <li>
Update Content 
</li>
          <li>
Save Import Steps 
</li>
          <li>
Schedule imports for a certain time and day 
</li>
        </ul>
        <h3>Pricing
</h3>
        <p>
You can buy a single domain license of CMSImport. With a single domain license you
are allowed to use  CMSImport PRO for a single domain and all subdomains, such
as www.example.com, accept.example.com, and local.example.com. 
</p>
        <p>
We also have a Enterprise license available. With an Enterprise license you are allowed
to install the CMSImport PRO on unlimited production web servers, and use it for unlimited
Umbraco instances within the Enterprise.  
</p>
        <p>
A single domain license will be available for  <strong>99 Euro</strong>, an enterpise
license for <strong>389 euro. </strong></p>
        <p>
When you buy a license you’ll get free updates within 90 days of purchase and 
free updates for all minor releases within a major release.  For example, if
you purchased a  1.0 version of CMSImport, you get free updates of all 1.x versions
through our <a href="http://www.cmsimport.com/clientarea.aspx" target="_blank">client
area</a>. 
</p>
        <p>
          <strong>Special 1.0 offer.</strong>When you buy the 1.0 release you’ll get a free
update to 2.x. <strong>This is a 1.0 offer only!</strong></p>
        <h3>
        </h3>
        <h3>What’s more in this release?
</h3>
        <p>
Several issues are solved in this release(both in the free and Pro release):
</p>
        <ul>
          <li>
"item with the same key already added" error when using duplicate column
names 
</li>
          <li>
Automapping column names 
</li>
          <li>
The imported document creator is not always the administrator anymore. It's using
the logged in user now. When you schedule an import you can select the user that should
be used as the creator of the document 
</li>
          <li>
Special characters in CSV are now supported, we’ve changed the reader from ANSI text
to Unicode 
</li>
          <li>
Sometimes CSV replaced spaces with empty strings, this is solved now 
</li>
          <li>
With member import you can now merge any member property into the template. Simply
surround the member property with [#(property here)] 
</li>
          <li>
Using a renamed Umbraco folder. This is possible now, although it will be better to
change it after install, otherwise you have to install manually. 
</li>
          <li>
We’ve removed the limitation to allow only one DataAdapter. We are thinking to build
a DataAdapter pack which contains adapters to import from wordpress, Rss, Outlook,
excel etc. These adapters will be available for free in the Commercial Edition and
for a small fee for the Free edition. 
</li>
        </ul>
        <h3>Roadmap
</h3>
        <p>
In the 1.x version we will add the following functionality:
</p>
        <ul>
          <li>
            <strong>FieldAdapters.</strong> Sounds boring but this is a big thing. When you import
data now, sometimes the import will fail. For example if you import boolean as text
(true/false) and want to store that in a True/False field in Umbraco it will fail.
Umbraco expects that the value will be 0/1. FieldAdapters will solve this problem.
If a insert of data fails. CMSImport will check if 1 o more FieldAdapters are available
to convert the data in the right format. This will be added to version 1.1 which must
be ready before CodeGarden 2010. 
</li>
          <li>
            <strong>Dictionary Import</strong>. Need I say more? 
</li>
          <li>
            <strong>
              <b>Hierarchical </b>imports</strong>(PRO only). 
</li>
        </ul>
        <p>
In the 2.x version we will add the following functionality:
</p>
        <ul>
          <li>
            <strong>
              <b>Hierarchical </b>import support in Data Adapters</strong>. Not the same
as the 1.x Hierarchical<strong></strong>import feature ;-) 
</li>
          <li>
            <strong>Export/import definitions (PRO only)</strong>. An easy way to deploy Import
definitions 
</li>
        </ul>
        <h3>
        </h3>
        <h3>More Info
</h3>
        <p>
For more info, download, or purchase you’ll go to <a title="http://www.cmsimport.com/" href="http://www.cmsimport.com/">http://www.cmsimport.com/</a></p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=90ffa866-c315-42be-9d32-bcf85c20e6bd" />
      </body>
      <title>CMSImport (PRO) 1.0.3 released</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,90ffa866-c315-42be-9d32-bcf85c20e6bd.aspx</guid>
      <link>http://www.richardsoeteman.net/2010/02/16/CMSImportPRO103Released.aspx</link>
      <pubDate>Tue, 16 Feb 2010 08:57:09 GMT</pubDate>
      <description>&lt;p&gt;
I’m very pleased to announce that CMSImport 1.0.3 is released. Now I can hear you
think CMSImport? Must be a fork of the great UmbImport package. No this isn’t the
case. A few weeks back Niels (AKA @Umbraco) asked me to change the name since &lt;a title="Umbraco" href="http://www.umbraco.org." target="_blank"&gt;Umbraco&lt;/a&gt; HQ
got a lot of requests about this package. So now the name is CMSImport and that’s
not going to change anymore.
&lt;/p&gt;
&lt;h3&gt;CMSImport PRO
&lt;/h3&gt;
&lt;p&gt;
Finally we’ve finished our commercial edition of CMSImport.&amp;#160; CMSImport PRO gives
you all the options of the default package and the following extra features: 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Update Content 
&lt;/li&gt;
&lt;li&gt;
Save Import Steps 
&lt;/li&gt;
&lt;li&gt;
Schedule imports for a certain time and day 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Pricing
&lt;/h3&gt;
&lt;p&gt;
You can buy a single domain license of CMSImport. With a single domain license you
are allowed to use&amp;#160; CMSImport PRO for a single domain and all subdomains, such
as www.example.com, accept.example.com, and local.example.com. 
&lt;/p&gt;
&lt;p&gt;
We also have a Enterprise license available. With an Enterprise license you are allowed
to install the CMSImport PRO on unlimited production web servers, and use it for unlimited
Umbraco instances within the Enterprise.&amp;#160; 
&lt;/p&gt;
&lt;p&gt;
A single domain license will be available for&amp;#160; &lt;strong&gt;99 Euro&lt;/strong&gt;, an enterpise
license for &lt;strong&gt;389 euro. &lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
When you buy a license you’ll get free updates within 90 days of purchase and&amp;#160;
free updates for all minor releases within a major release.&amp;#160; For example, if
you purchased a&amp;#160; 1.0 version of CMSImport, you get free updates of all 1.x versions
through our &lt;a href="http://www.cmsimport.com/clientarea.aspx" target="_blank"&gt;client
area&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Special 1.0 offer.&lt;/strong&gt;When you buy the 1.0 release you’ll get a free
update to 2.x. &lt;strong&gt;This is a 1.0 offer only!&lt;/strong&gt;
&lt;/p&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;What’s more in this release?
&lt;/h3&gt;
&lt;p&gt;
Several issues are solved in this release(both in the free and Pro release):
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&amp;quot;item with the same key already added&amp;quot; error when using duplicate column
names 
&lt;/li&gt;
&lt;li&gt;
Automapping column names 
&lt;/li&gt;
&lt;li&gt;
The imported document creator is not always the administrator anymore. It's using
the logged in user now. When you schedule an import you can select the user that should
be used as the creator of the document 
&lt;/li&gt;
&lt;li&gt;
Special characters in CSV are now supported, we’ve changed the reader from ANSI text
to Unicode 
&lt;/li&gt;
&lt;li&gt;
Sometimes CSV replaced spaces with empty strings, this is solved now 
&lt;/li&gt;
&lt;li&gt;
With member import you can now merge any member property into the template. Simply
surround the member property with [#(property here)] 
&lt;/li&gt;
&lt;li&gt;
Using a renamed Umbraco folder. This is possible now, although it will be better to
change it after install, otherwise you have to install manually. 
&lt;/li&gt;
&lt;li&gt;
We’ve removed the limitation to allow only one DataAdapter. We are thinking to build
a DataAdapter pack which contains adapters to import from wordpress, Rss, Outlook,
excel etc. These adapters will be available for free in the Commercial Edition and
for a small fee for the Free edition. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Roadmap
&lt;/h3&gt;
&lt;p&gt;
In the 1.x version we will add the following functionality:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;FieldAdapters.&lt;/strong&gt; Sounds boring but this is a big thing. When you import
data now, sometimes the import will fail. For example if you import boolean as text
(true/false) and want to store that in a True/False field in Umbraco it will fail.
Umbraco expects that the value will be 0/1. FieldAdapters will solve this problem.
If a insert of data fails. CMSImport will check if 1 o more FieldAdapters are available
to convert the data in the right format. This will be added to version 1.1 which must
be ready before CodeGarden 2010. 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dictionary Import&lt;/strong&gt;. Need I say more? 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;b&gt;Hierarchical &lt;/b&gt;imports&lt;/strong&gt;(PRO only). 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In the 2.x version we will add the following functionality:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;b&gt;Hierarchical &lt;/b&gt;import support in Data Adapters&lt;/strong&gt;. Not the same
as the 1.x Hierarchical&lt;strong&gt; &lt;/strong&gt;import feature ;-) 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Export/import definitions (PRO only)&lt;/strong&gt;. An easy way to deploy Import
definitions 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;More Info
&lt;/h3&gt;
&lt;p&gt;
For more info, download, or purchase you’ll go to &lt;a title="http://www.cmsimport.com/" href="http://www.cmsimport.com/"&gt;http://www.cmsimport.com/&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=90ffa866-c315-42be-9d32-bcf85c20e6bd" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,90ffa866-c315-42be-9d32-bcf85c20e6bd.aspx</comments>
      <category>CMSImport</category>
      <category>Package</category>
      <category>UmbImport</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=ca001b5a-93d9-456c-9b82-5b345d5a1b80</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,ca001b5a-93d9-456c-9b82-5b345d5a1b80.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,ca001b5a-93d9-456c-9b82-5b345d5a1b80.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ca001b5a-93d9-456c-9b82-5b345d5a1b80</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just a small blogpost to announce that I’ve just made a new release of the Package
Action Contrib project. The following actions are added to the project:
</p>
        <ul>
          <li>
AddConfigurationSection 
</li>
          <li>
PermissionForApp 
</li>
          <li>
AddLanguageFileKey 
</li>
          <li>
MoveFile 
</li>
          <li>
UpdateAppTree 
</li>
        </ul>
        <p>
You can download the new release and documentation from <a href="http://packageactioncontrib.codeplex.com/" target="_blank">codeplex</a>.
I’ve also updated the WIKI page on <a title="Umbraco" href="http://our.umbraco.org/wiki/reference/packaging/package-actions/community-made-package-actions" target="_blank">our.umbraco.org</a>.
</p>
        <p>
          <br />
Many thanks to the contributors of this release, Simon Dingley, Chris Houston, Dirk
de Grave and Søren Spelling Lund for submitting their code!
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=ca001b5a-93d9-456c-9b82-5b345d5a1b80" />
      </body>
      <title>Package Action Contrib 1.0.4</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,ca001b5a-93d9-456c-9b82-5b345d5a1b80.aspx</guid>
      <link>http://www.richardsoeteman.net/2010/02/03/PackageActionContrib104.aspx</link>
      <pubDate>Wed, 03 Feb 2010 15:45:02 GMT</pubDate>
      <description>&lt;p&gt;
Just a small blogpost to announce that I’ve just made a new release of the Package
Action Contrib project. The following actions are added to the project:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
AddConfigurationSection 
&lt;/li&gt;
&lt;li&gt;
PermissionForApp 
&lt;/li&gt;
&lt;li&gt;
AddLanguageFileKey 
&lt;/li&gt;
&lt;li&gt;
MoveFile 
&lt;/li&gt;
&lt;li&gt;
UpdateAppTree 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
You can download the new release and documentation from &lt;a href="http://packageactioncontrib.codeplex.com/" target="_blank"&gt;codeplex&lt;/a&gt;.
I’ve also updated the WIKI page on &lt;a title="Umbraco" href="http://our.umbraco.org/wiki/reference/packaging/package-actions/community-made-package-actions" target="_blank"&gt;our.umbraco.org&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;br /&gt;
Many thanks to the contributors of this release, Simon Dingley, Chris Houston, Dirk
de Grave and Søren Spelling Lund for submitting their code!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=ca001b5a-93d9-456c-9b82-5b345d5a1b80" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,ca001b5a-93d9-456c-9b82-5b345d5a1b80.aspx</comments>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=24e1d561-1f6c-4411-bd62-584023d31df7</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,24e1d561-1f6c-4411-bd62-584023d31df7.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,24e1d561-1f6c-4411-bd62-584023d31df7.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=24e1d561-1f6c-4411-bd62-584023d31df7</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This <a href="http://our.umbraco.org/forum/developers/extending-umbraco/6203-Add-new-parameter-types-to-Macros?p=0#comment22398" target="_blank">forum
post</a>  triggered me to share some code that I had. A while back I was building
a site which  let the customers define their own custom overviews One requirement
was that users could define the sort by property . To do this you can use the property
picker but it wasn’t friendly enough for my case so I ended up building a custom macro
parameter type. 
</p>
        <p>
To start you need to create a new class library and add references to the following
assemblies:
</p>
        <ul>
          <li>
Businesslogic 
</li>
          <li>
Cms 
</li>
          <li>
Interfaces 
</li>
          <li>
            <a title="Umbraco" href="http://www.umbraco.org." target="_blank">Umbraco</a>
          </li>
          <li>
System.web 
</li>
        </ul>
        <p>
In the example below I’ve created a class that inherits from dropdownlist. This was
the easiest way since I needed a dropdownlist and didn’t want to play with the control
tree, Now more important is that this class inherits from the <em>IMacroGuiRendering</em> Interface. 
This add two properties ShowCaption, to show the caption on the parameters tab and
more important value which holds the selected value .  
</p>
        <div class="csharpcode">
          <pre>
            <span class="lnum"> 1: </span>
            <span class="kwrd">using</span> System;</pre>
          <pre>
            <span class="lnum"> 2: </span>
            <span class="kwrd">using</span> System.Collections.Generic;</pre>
          <pre>
            <span class="lnum"> 3: </span>
            <span class="kwrd">using</span> System.Text;</pre>
          <pre>
            <span class="lnum"> 4: </span>
            <span class="kwrd">using</span> System.Web.UI.WebControls;</pre>
          <pre>
            <span class="lnum"> 5: </span>
            <span class="kwrd">using</span> umbraco.interfaces;</pre>
          <pre>
            <span class="lnum"> 6: </span> </pre>
          <pre>
            <span class="lnum"> 7: </span>
            <span class="kwrd">namespace</span> MacroRenderDemo</pre>
          <pre>
            <span class="lnum"> 8: </span>{</pre>
          <pre>
            <span class="lnum"> 9: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">class</span> OrderBy
: DropDownList, IMacroGuiRendering</pre>
          <pre>
            <span class="lnum"> 10: </span> {</pre>
          <pre>
            <span class="lnum"> 11: </span>
            <span class="kwrd">protected</span>
            <span class="kwrd">override</span>
            <span class="kwrd">void</span> OnLoad(EventArgs
e)</pre>
          <pre>
            <span class="lnum"> 12: </span> {</pre>
          <pre>
            <span class="lnum"> 13: </span>
            <span class="kwrd">base</span>.OnLoad(e);</pre>
          <pre>
            <span class="lnum"> 14: </span>
            <span class="kwrd">if</span> (<span class="kwrd">this</span>.Items.Count
== 0)</pre>
          <pre>
            <span class="lnum"> 15: </span> {</pre>
          <pre>
            <span class="lnum"> 16: </span>
            <span class="kwrd">this</span>.Items.Add(<span class="kwrd">new</span> ListItem(<span class="str">"Title"</span>, <span class="str">"nodeName"</span>));</pre>
          <pre>
            <span class="lnum"> 17: </span>
            <span class="kwrd">this</span>.Items.Add(<span class="kwrd">new</span> ListItem(<span class="str">"Date"</span>, <span class="str">"createDate"</span>));</pre>
          <pre>
            <span class="lnum"> 18: </span> }</pre>
          <pre>
            <span class="lnum"> 19: </span> }</pre>
          <pre>
            <span class="lnum"> 20: </span> </pre>
          <pre>
            <span class="lnum"> 21: </span>
            <span class="preproc">#region</span> IMacroGuiRendering
Members</pre>
          <pre>
            <span class="lnum"> 22: </span> </pre>
          <pre>
            <span class="lnum"> 23: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">bool</span> ShowCaption</pre>
          <pre>
            <span class="lnum"> 24: </span> {</pre>
          <pre>
            <span class="lnum"> 25: </span> get { <span class="kwrd">return</span><span class="kwrd">true</span>;
}</pre>
          <pre>
            <span class="lnum"> 26: </span> }</pre>
          <pre>
            <span class="lnum"> 27: </span> </pre>
          <pre>
            <span class="lnum"> 28: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">string</span> Value</pre>
          <pre>
            <span class="lnum"> 29: </span> {</pre>
          <pre>
            <span class="lnum"> 30: </span> get</pre>
          <pre>
            <span class="lnum"> 31: </span> {</pre>
          <pre>
            <span class="lnum"> 32: </span>
            <span class="kwrd">return</span>
            <span class="kwrd">this</span>.SelectedValue;</pre>
          <pre>
            <span class="lnum"> 33: </span> }</pre>
          <pre>
            <span class="lnum"> 34: </span> set</pre>
          <pre>
            <span class="lnum"> 35: </span> {</pre>
          <pre>
            <span class="lnum"> 36: </span>
            <span class="kwrd">this</span>.SelectedValue
= <span class="kwrd">value</span>;</pre>
          <pre>
            <span class="lnum"> 37: </span> }</pre>
          <pre>
            <span class="lnum"> 38: </span> }</pre>
          <pre>
            <span class="lnum"> 39: </span> </pre>
          <pre>
            <span class="lnum"> 40: </span>
            <span class="preproc">#endregion</span>
          </pre>
          <pre>
            <span class="lnum"> 41: </span> }</pre>
          <pre>
            <span class="lnum"> 42: </span>}</pre>
        </div>
        <style type="text/css">

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
When you build the project and add the binary into the bin folder of your Umbraco
site you still can’t select the new type from the parameter type list. First we need
to register the class  in the database. Below you’ll see the database table that
holds all the Macro property types.
</p>
        <p>
          <img title="dbrecords" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="378" alt="dbrecords" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Createacustommacroparametertype_1212C/dbrecords_25180f92-f0b8-4354-9f5c-704b8160735b.jpg" width="881" border="0" /> 
</p>
        <p>
It is important that you add the Assemblyname  including the namespace to the
macroPropertyTypeRenderAssembly column and add the name of your class to the 
macroPropertyTypeRenderAssembly column . 
</p>
        <p>
Now we can use the parameter in our macro’s
</p>
        <p>
          <img title="parameters" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="474" alt="parameters" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Createacustommacroparametertype_1212C/parameters_5296818b-a8b7-42b3-9a5a-eb9b46a229da.jpg" width="953" border="0" />
        </p>
        <p>
and off course we can now use the new parameter in our template when we select the
macro
</p>
        <p>
          <img title="InsertMacro" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="557" alt="InsertMacro" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Createacustommacroparametertype_1212C/InsertMacro_2202d017-5aa8-4afc-a633-6f67b2390cb6.jpg" width="472" border="0" />
        </p>
        <p>
Another example how flexible Umbraco is. If a requirement isn’t available out of the
box, usuallyall it takes is to implement an interface and write a few lines of code.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=24e1d561-1f6c-4411-bd62-584023d31df7" />
      </body>
      <title>Create a custom macro parameter type</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,24e1d561-1f6c-4411-bd62-584023d31df7.aspx</guid>
      <link>http://www.richardsoeteman.net/2010/01/04/CreateACustomMacroParameterType.aspx</link>
      <pubDate>Mon, 04 Jan 2010 21:37:53 GMT</pubDate>
      <description>&lt;p&gt;
This &lt;a href="http://our.umbraco.org/forum/developers/extending-umbraco/6203-Add-new-parameter-types-to-Macros?p=0#comment22398" target="_blank"&gt;forum
post&lt;/a&gt;&amp;#160; triggered me to share some code that I had. A while back I was building
a site which&amp;#160; let the customers define their own custom overviews One requirement
was that users could define the sort by property . To do this you can use the property
picker but it wasn’t friendly enough for my case so I ended up building a custom macro
parameter type. 
&lt;/p&gt;
&lt;p&gt;
To start you need to create a new class library and add references to the following
assemblies:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Businesslogic 
&lt;/li&gt;
&lt;li&gt;
Cms 
&lt;/li&gt;
&lt;li&gt;
Interfaces 
&lt;/li&gt;
&lt;li&gt;
&lt;a title="Umbraco" href="http://www.umbraco.org." target="_blank"&gt;Umbraco&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
System.web 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In the example below I’ve created a class that inherits from dropdownlist. This was
the easiest way since I needed a dropdownlist and didn’t want to play with the control
tree, Now more important is that this class inherits from the &lt;em&gt;IMacroGuiRendering&lt;/em&gt; Interface.&amp;#160;
This add two properties ShowCaption, to show the caption on the parameters tab and
more important value which holds the selected value .&amp;#160; 
&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 2: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 3: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 4: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 5: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; umbraco.interfaces;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 6: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 7: &lt;/span&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; MacroRenderDemo&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 8: &lt;/span&gt;{&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 9: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; OrderBy
: DropDownList, IMacroGuiRendering&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 10: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 11: &lt;/span&gt; &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; OnLoad(EventArgs
e)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 12: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 13: &lt;/span&gt; &lt;span class="kwrd"&gt;base&lt;/span&gt;.OnLoad(e);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 14: &lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;this&lt;/span&gt;.Items.Count
== 0)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 15: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 16: &lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.Items.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; ListItem(&lt;span class="str"&gt;&amp;quot;Title&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;nodeName&amp;quot;&lt;/span&gt;));&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 17: &lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.Items.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; ListItem(&lt;span class="str"&gt;&amp;quot;Date&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;createDate&amp;quot;&lt;/span&gt;));&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 18: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 19: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 20: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 21: &lt;/span&gt; &lt;span class="preproc"&gt;#region&lt;/span&gt; IMacroGuiRendering
Members&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 22: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 23: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; ShowCaption&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 24: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 25: &lt;/span&gt; get { &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;true&lt;/span&gt;;
}&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 26: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 27: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 28: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Value&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 29: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 30: &lt;/span&gt; get&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 31: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 32: &lt;/span&gt; &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.SelectedValue;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 33: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 34: &lt;/span&gt; set&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 35: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 36: &lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.SelectedValue
= &lt;span class="kwrd"&gt;value&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 37: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 38: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 39: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 40: &lt;/span&gt; &lt;span class="preproc"&gt;#endregion&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 41: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 42: &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
When you build the project and add the binary into the bin folder of your Umbraco
site you still can’t select the new type from the parameter type list. First we need
to register the class&amp;#160; in the database. Below you’ll see the database table that
holds all the Macro property types.
&lt;/p&gt;
&lt;p&gt;
&lt;img title="dbrecords" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="378" alt="dbrecords" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Createacustommacroparametertype_1212C/dbrecords_25180f92-f0b8-4354-9f5c-704b8160735b.jpg" width="881" border="0" /&gt;&amp;#160;
&lt;/p&gt;
&lt;p&gt;
It is important that you add the Assemblyname&amp;#160; including the namespace to the
macroPropertyTypeRenderAssembly column and add the name of your class to the&amp;#160;
macroPropertyTypeRenderAssembly column . 
&lt;/p&gt;
&lt;p&gt;
Now we can use the parameter in our macro’s
&lt;/p&gt;
&lt;p&gt;
&lt;img title="parameters" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="474" alt="parameters" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Createacustommacroparametertype_1212C/parameters_5296818b-a8b7-42b3-9a5a-eb9b46a229da.jpg" width="953" border="0" /&gt; 
&lt;/p&gt;
&lt;p&gt;
and off course we can now use the new parameter in our template when we select the
macro
&lt;/p&gt;
&lt;p&gt;
&lt;img title="InsertMacro" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="557" alt="InsertMacro" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Createacustommacroparametertype_1212C/InsertMacro_2202d017-5aa8-4afc-a633-6f67b2390cb6.jpg" width="472" border="0" /&gt; 
&lt;/p&gt;
&lt;p&gt;
Another example how flexible Umbraco is. If a requirement isn’t available out of the
box, usuallyall it takes is to implement an interface and write a few lines of code.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=24e1d561-1f6c-4411-bd62-584023d31df7" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,24e1d561-1f6c-4411-bd62-584023d31df7.aspx</comments>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=5cf8a3ee-a946-4802-9cea-a8acac814a97</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,5cf8a3ee-a946-4802-9cea-a8acac814a97.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,5cf8a3ee-a946-4802-9cea-a8acac814a97.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=5cf8a3ee-a946-4802-9cea-a8acac814a97</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Let’s start with wishing you all the best for 2010. 2009 was an insane year for me,
I had given myself one year  being successful in business running my own <a title="Umbraco" href="http://www.umbraco.org." target="_blank">Umbraco</a> 
projects instead of being a .net contractor. That turned out great, I’ve got a lot
of new customers, have build a few great sites for my customers  and did a few
Umbraco consulting jobs. So now it’s time to make plans for 2010.  First thing
is that I’m moving to a real office instead of working from home. I’m really excited
about this because I’m moving to an office building with lots of small companies,
I think that’s really inspiring. 
</p>
        <p>
When I’ve started investigating Umbraco back in 2008 we had a small amount of companies
in the Netherlands (mostly freelancers) that where building websites based on Umbraco.
Nowadays I see new companies that build Umbraco websites every week, not only small
shops but also really big agencies. For this year my focus will be on helping companies
(worldwide) being successful implementing Umbraco sites for their clients by offering
consultancy services and custom package development  instead of building sites
from front to end.
</p>
        <p>
As you might know I’m also working for a long time on <a href="http://umbimport.soetemansoftware.nl/" target="_blank">UmbImport
PRO</a>. My plan was to release this package last year. It’s the top prio on my todolist
for Q1 this year. Also another package will see the light this year, UmbLinkChecker.
As the name says this will be a package that checks every link in your published site,
not only in content but also hard coded links in your templates etc., I will build
a free and Pro version. Since Umbraco has more than 75000 active installs I think
it’s profitable to build commercial packages for Umbraco and we will see more and
more commercial packages from different vendors. Hope the Umbraco store will be back
up in 2010 and filled with great products.
</p>
        <p>
The last year I couldn’t find enough time to blog or write WIKI’s and helping the
community with their problems on the forum. I’m hoping this year that will change,
since I’ve got a lot of info that I’d like to share. 
</p>
        <p>
Have a great 2010!
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=5cf8a3ee-a946-4802-9cea-a8acac814a97" />
      </body>
      <title>Plans for 2010</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,5cf8a3ee-a946-4802-9cea-a8acac814a97.aspx</guid>
      <link>http://www.richardsoeteman.net/2010/01/02/PlansFor2010.aspx</link>
      <pubDate>Sat, 02 Jan 2010 09:34:32 GMT</pubDate>
      <description>&lt;p&gt;
Let’s start with wishing you all the best for 2010. 2009 was an insane year for me,
I had given myself one year&amp;#160; being successful in business running my own &lt;a title="Umbraco" href="http://www.umbraco.org." target="_blank"&gt;Umbraco&lt;/a&gt;&amp;#160;
projects instead of being a .net contractor. That turned out great, I’ve got a lot
of new customers, have build a few great sites for my customers&amp;#160; and did a few
Umbraco consulting jobs. So now it’s time to make plans for 2010.&amp;#160; First thing
is that I’m moving to a real office instead of working from home. I’m really excited
about this because I’m moving to an office building with lots of small companies,
I think that’s really inspiring. 
&lt;/p&gt;
&lt;p&gt;
When I’ve started investigating Umbraco back in 2008 we had a small amount of companies
in the Netherlands (mostly freelancers) that where building websites based on Umbraco.
Nowadays I see new companies that build Umbraco websites every week, not only small
shops but also really big agencies. For this year my focus will be on helping companies
(worldwide) being successful implementing Umbraco sites for their clients by offering
consultancy services and custom package development&amp;#160; instead of building sites
from front to end.
&lt;/p&gt;
&lt;p&gt;
As you might know I’m also working for a long time on &lt;a href="http://umbimport.soetemansoftware.nl/" target="_blank"&gt;UmbImport
PRO&lt;/a&gt;. My plan was to release this package last year. It’s the top prio on my todolist
for Q1 this year. Also another package will see the light this year, UmbLinkChecker.
As the name says this will be a package that checks every link in your published site,
not only in content but also hard coded links in your templates etc., I will build
a free and Pro version. Since Umbraco has more than 75000 active installs I think
it’s profitable to build commercial packages for Umbraco and we will see more and
more commercial packages from different vendors. Hope the Umbraco store will be back
up in 2010 and filled with great products.
&lt;/p&gt;
&lt;p&gt;
The last year I couldn’t find enough time to blog or write WIKI’s and helping the
community with their problems on the forum. I’m hoping this year that will change,
since I’ve got a lot of info that I’d like to share. 
&lt;/p&gt;
&lt;p&gt;
Have a great 2010!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=5cf8a3ee-a946-4802-9cea-a8acac814a97" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,5cf8a3ee-a946-4802-9cea-a8acac814a97.aspx</comments>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=43d3de2a-bec8-4a85-ae43-6e3f8375aff9</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,43d3de2a-bec8-4a85-ae43-6e3f8375aff9.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,43d3de2a-bec8-4a85-ae43-6e3f8375aff9.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=43d3de2a-bec8-4a85-ae43-6e3f8375aff9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Usually I develop websites that require login functionality for one or more roles,
now this is all cool for my clients but it’s a nightmare for me because I simply can’t
remember all the login and passwords. To make my life and other developers life’s
a little bit easier I’ve developed the Memberswitcher package. This package let's
you easily login members and switch between members by simply selecting a member from
a pull down list instead of enter the username and password. It’s using a lower level
asp.net membership method to login the member based on the username and is fully compatible
with all the asp.net Membership controls. Also the methods to fill the Membergroup
and Member pulldowns are using Membership methods, so it will work with the <a title="Umbraco" href="http://www.umbraco.org." target="_blank">Umbraco</a> members
but also with other membership providers.
</p>
        <p>
Once installed, an extra macro is added to the list. In your template select the Memberswitcher
macro, optional specify a node to redirect to once logged in and that’s it. 
<br />
&lt;umbraco:Macro RedirectToNodeAfterLogin="" Alias="MemberSwitcher"
runat="server"&gt;&lt;/umbraco:Macro&gt;
</p>
        <p>
When you visit the website you’ll see the control in action. First select the Membergroup
and Member.
</p>
        <p>
          <img title="membershwitcher_1" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="431" alt="membershwitcher_1" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Memberswitcherpackage_7946/membershwitcher_1_d79dacdd-1d35-41cb-afef-540edf3b3c4e.png" width="923" border="0" />  
<br />
When you click the Login selected member button you’ll be logged in as you can see
in the following screenshot that is using the asp.net LoginStatus control.
</p>
        <p>
          <img title="membershwitcher_2" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="438" alt="membershwitcher_2" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Memberswitcherpackage_7946/membershwitcher_2_2399ebbd-fa92-4774-9eff-12e027e19f70.png" width="906" border="0" />
        </p>
        <p>
Needless to say: 
<br /><strong>DO NOT USE THIS PACKAGE IN A PRODUCTION ENVIRONMENT!! </strong></p>
        <p>
Download the package <a href="http://our.umbraco.org/projects/memberswitcher" target="_blank">here</a></p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=43d3de2a-bec8-4a85-ae43-6e3f8375aff9" />
      </body>
      <title>Memberswitcher package</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,43d3de2a-bec8-4a85-ae43-6e3f8375aff9.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/12/27/MemberswitcherPackage.aspx</link>
      <pubDate>Sun, 27 Dec 2009 07:37:27 GMT</pubDate>
      <description>&lt;p&gt;
Usually I develop websites that require login functionality for one or more roles,
now this is all cool for my clients but it’s a nightmare for me because I simply can’t
remember all the login and passwords. To make my life and other developers life’s
a little bit easier I’ve developed the Memberswitcher package. This package let's
you easily login members and switch between members by simply selecting a member from
a pull down list instead of enter the username and password. It’s using a lower level
asp.net membership method to login the member based on the username and is fully compatible
with all the asp.net Membership controls. Also the methods to fill the Membergroup
and Member pulldowns are using Membership methods, so it will work with the &lt;a title="Umbraco" href="http://www.umbraco.org." target="_blank"&gt;Umbraco&lt;/a&gt; members
but also with other membership providers.
&lt;/p&gt;
&lt;p&gt;
Once installed, an extra macro is added to the list. In your template select the Memberswitcher
macro, optional specify a node to redirect to once logged in and that’s it. 
&lt;br /&gt;
&amp;lt;umbraco:Macro RedirectToNodeAfterLogin=&amp;quot;&amp;quot; Alias=&amp;quot;MemberSwitcher&amp;quot;
runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/umbraco:Macro&amp;gt;
&lt;/p&gt;
&lt;p&gt;
When you visit the website you’ll see the control in action. First select the Membergroup
and Member.
&lt;/p&gt;
&lt;p&gt;
&lt;img title="membershwitcher_1" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="431" alt="membershwitcher_1" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Memberswitcherpackage_7946/membershwitcher_1_d79dacdd-1d35-41cb-afef-540edf3b3c4e.png" width="923" border="0" /&gt;&amp;#160; 
&lt;br /&gt;
When you click the Login selected member button you’ll be logged in as you can see
in the following screenshot that is using the asp.net LoginStatus control.
&lt;/p&gt;
&lt;p&gt;
&lt;img title="membershwitcher_2" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="438" alt="membershwitcher_2" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Memberswitcherpackage_7946/membershwitcher_2_2399ebbd-fa92-4774-9eff-12e027e19f70.png" width="906" border="0" /&gt; 
&lt;/p&gt;
&lt;p&gt;
Needless to say: 
&lt;br /&gt;
&lt;strong&gt;DO NOT USE THIS PACKAGE IN A PRODUCTION ENVIRONMENT!! &lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Download the package &lt;a href="http://our.umbraco.org/projects/memberswitcher" target="_blank"&gt;here&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=43d3de2a-bec8-4a85-ae43-6e3f8375aff9" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,43d3de2a-bec8-4a85-ae43-6e3f8375aff9.aspx</comments>
      <category>Package</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=bdc34020-7c06-49ca-ae62-9c1b4cbbacbd</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,bdc34020-7c06-49ca-ae62-9c1b4cbbacbd.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,bdc34020-7c06-49ca-ae62-9c1b4cbbacbd.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=bdc34020-7c06-49ca-ae62-9c1b4cbbacbd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A few weeks back I had this  issue when deploying a site. I needed to modify
a documenttype to add a few properties and after a few minutes an error was raised
and the only thing I could see when I deleted the property and saved the documenttype
again, or opened a document based on that document type was the following error message
(thanks Dan for the picture).  
</p>
        <p>
          <img title="error-delete (3)" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="345" alt="error-delete (3)" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/ObjectReferenceNotSetafteraddingordeleti_A407/error-delete%20(3)_2c661d11-e7ab-4a49-adc1-ab3776eb221a.jpg" width="640" border="0" />
        </p>
        <p>
Did I make a backup? ehh no, so I needed to fix this. Okay let’s look at  the
error message again. An Object reference not set error is thrown while deleting the
property. Love that <a title="Umbraco" href="http://www.umbraco.org." target="_blank">Umbraco</a> is
open source and I can have a look at the source code. Below you see the method that
is responsible for deleting the property from the documenttype.
</p>
        <div class="csharpcode">
          <pre>
            <span class="lnum"> 1: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">void</span> delete()</pre>
          <pre>
            <span class="lnum"> 2: </span> {</pre>
          <pre>
            <span class="lnum"> 3: </span>
            <span class="rem">// flush cache</span>
          </pre>
          <pre>
            <span class="lnum"> 4: </span> FlushCache();</pre>
          <pre>
            <span class="lnum"> 5: </span> </pre>
          <pre>
            <span class="lnum"> 6: </span>
            <span class="rem">// Delete all properties of
propertytype</span>
          </pre>
          <pre>
            <span class="lnum"> 7: </span>
            <span class="kwrd">foreach</span>(Content c <span class="kwrd">in</span> Content.getContentOfContentType(<span class="kwrd">new</span> ContentType(_contenttypeid)))</pre>
          <pre>
            <span class="lnum"> 8: </span> {</pre>
          <pre>
            <span class="lnum"> 9: </span> c.getProperty(<span class="kwrd">this</span>).delete();</pre>
          <pre>
            <span class="lnum"> 10: </span> }</pre>
          <pre>
            <span class="lnum"> 11: </span>
            <span class="rem">// Delete PropertyType ..</span>
          </pre>
          <pre>
            <span class="lnum"> 12: </span> SqlHelper.ExecuteNonQuery(<span class="str">"Delete
from cmsPropertyType where id = "</span> + <span class="kwrd">this</span>.Id);</pre>
          <pre>
            <span class="lnum"> 13: </span>
            <span class="kwrd">this</span>.InvalidateCache();</pre>
          <pre>
            <span class="lnum"> 14: </span> }</pre>
        </div>
        <style type="text/css">

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
As you might have seen there is no check for null values on the 9 (c.getProperty(<span class="kwrd">this</span>).delete();).
This is what caused the error while deleting the property. I assume it's sort of the
same issue when opening a document. Now that I know this I can work on a solution.
As I mentioned earlier, I needed to add properties to the document type. Below you
find the code I’ve used to do that. 
</p>
        <div class="csharpcode">
          <pre>
            <span class="lnum"> 1: </span> ContentType ct = ContentType.GetByAlias(<span class="str">"_advertiser"</span>);</pre>
          <pre>
            <span class="lnum"> 2: </span>
            <span class="kwrd">foreach</span> (PropertyType
i <span class="kwrd">in</span> ct.PropertyTypes)</pre>
          <pre>
            <span class="lnum"> 3: </span> {</pre>
          <pre>
            <span class="lnum"> 4: </span>
            <span class="kwrd">if</span> (i.Alias == <span class="str">"linkToSpecial"</span>)</pre>
          <pre>
            <span class="lnum"> 5: </span> {</pre>
          <pre>
            <span class="lnum"> 6: </span>
            <span class="rem">// Delete all properties of
propertytype</span>
          </pre>
          <pre>
            <span class="lnum"> 7: </span>
            <span class="kwrd">foreach</span> (umbraco.cms.businesslogic.Content
c <span class="kwrd">in</span> umbraco.cms.businesslogic.Content.getContentOfContentType(ct))</pre>
          <pre>
            <span class="lnum"> 8: </span> {</pre>
          <pre>
            <span class="lnum"> 9: </span>
            <span class="kwrd">if</span> (c.getProperty(<span class="str">"linkToSpecial"</span>)
== <span class="kwrd">null</span>)</pre>
          <pre>
            <span class="lnum"> 10: </span> {</pre>
          <pre>
            <span class="lnum"> 11: </span> c.addProperty(i, c.Version);</pre>
          <pre>
            <span class="lnum"> 12: </span> c.Save();</pre>
          <pre>
            <span class="lnum"> 13: </span> }</pre>
          <pre>
            <span class="lnum"> 14: </span> }</pre>
          <pre>
            <span class="lnum"> 15: </span>
            <span class="rem">//Remove comment to delete
the property from the doctype</span>
          </pre>
          <pre>
            <span class="lnum"> 16: </span>
            <span class="rem">//i.delete();</span>
          </pre>
          <pre>
            <span class="lnum"> 17: </span>
            <span class="rem">//ct.Save();</span>
          </pre>
          <pre>
            <span class="lnum"> 18: </span> }</pre>
          <pre>
            <span class="lnum"> 19: </span> }</pre>
        </div>
        <style type="text/css">

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
As you can see, I’ve used a  few hard coded values. <strong>_advertiser</strong> is
the alias of the document type and <strong>linkToSpecial</strong> is the alias of
the property that I wanted to add on the Document type. If you want to delete the
property  remove  lines 9-13 and remove the comment on line 16 and 17. You
can use this code in a usercontrol and use that usercontrol as a dashboard control. <strong>Needless
to say, this code comes without a warranty.</strong></p>
        <p>
I’ve added <a href="http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=24871" target="_blank">the
issue to codeplex</a>, please vote for it!. Hope this post is a nice work around for
the issue.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=bdc34020-7c06-49ca-ae62-9c1b4cbbacbd" />
      </body>
      <title>Fix Object reference not set error after adding or deleting a document property</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,bdc34020-7c06-49ca-ae62-9c1b4cbbacbd.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/10/27/FixObjectReferenceNotSetErrorAfterAddingOrDeletingADocumentProperty.aspx</link>
      <pubDate>Tue, 27 Oct 2009 20:06:12 GMT</pubDate>
      <description>&lt;p&gt;
A few weeks back I had this&amp;#160; issue when deploying a site. I needed to modify
a documenttype to add a few properties and after a few minutes an error was raised
and the only thing I could see when I deleted the property and saved the documenttype
again, or opened a document based on that document type was the following error message
(thanks Dan for the picture).&amp;#160; 
&lt;/p&gt;
&lt;p&gt;
&lt;img title="error-delete (3)" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="345" alt="error-delete (3)" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/ObjectReferenceNotSetafteraddingordeleti_A407/error-delete%20(3)_2c661d11-e7ab-4a49-adc1-ab3776eb221a.jpg" width="640" border="0" /&gt;
&lt;/p&gt;
&lt;p&gt;
Did I make a backup? ehh no, so I needed to fix this. Okay let’s look at&amp;#160; the
error message again. An Object reference not set error is thrown while deleting the
property. Love that &lt;a title="Umbraco" href="http://www.umbraco.org." target="_blank"&gt;Umbraco&lt;/a&gt; is
open source and I can have a look at the source code. Below you see the method that
is responsible for deleting the property from the documenttype.
&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; delete()&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 2: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 3: &lt;/span&gt; &lt;span class="rem"&gt;// flush cache&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 4: &lt;/span&gt; FlushCache();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 5: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 6: &lt;/span&gt; &lt;span class="rem"&gt;// Delete all properties of
propertytype&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 7: &lt;/span&gt; &lt;span class="kwrd"&gt;foreach&lt;/span&gt;(Content c &lt;span class="kwrd"&gt;in&lt;/span&gt; Content.getContentOfContentType(&lt;span class="kwrd"&gt;new&lt;/span&gt; ContentType(_contenttypeid)))&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 8: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 9: &lt;/span&gt; c.getProperty(&lt;span class="kwrd"&gt;this&lt;/span&gt;).delete();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 10: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 11: &lt;/span&gt; &lt;span class="rem"&gt;// Delete PropertyType ..&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 12: &lt;/span&gt; SqlHelper.ExecuteNonQuery(&lt;span class="str"&gt;&amp;quot;Delete
from cmsPropertyType where id = &amp;quot;&lt;/span&gt; + &lt;span class="kwrd"&gt;this&lt;/span&gt;.Id);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 13: &lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.InvalidateCache();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 14: &lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
As you might have seen there is no check for null values on the 9 (c.getProperty(&lt;span class="kwrd"&gt;this&lt;/span&gt;).delete();).
This is what caused the error while deleting the property. I assume it's sort of the
same issue when opening a document. Now that I know this I can work on a solution.
As I mentioned earlier, I needed to add properties to the document type. Below you
find the code I’ve used to do that. 
&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt; ContentType ct = ContentType.GetByAlias(&lt;span class="str"&gt;&amp;quot;_advertiser&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 2: &lt;/span&gt; &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (PropertyType
i &lt;span class="kwrd"&gt;in&lt;/span&gt; ct.PropertyTypes)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 3: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 4: &lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (i.Alias == &lt;span class="str"&gt;&amp;quot;linkToSpecial&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 5: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 6: &lt;/span&gt; &lt;span class="rem"&gt;// Delete all properties of
propertytype&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 7: &lt;/span&gt; &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (umbraco.cms.businesslogic.Content
c &lt;span class="kwrd"&gt;in&lt;/span&gt; umbraco.cms.businesslogic.Content.getContentOfContentType(ct))&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 8: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 9: &lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (c.getProperty(&lt;span class="str"&gt;&amp;quot;linkToSpecial&amp;quot;&lt;/span&gt;)
== &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 10: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 11: &lt;/span&gt; c.addProperty(i, c.Version);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 12: &lt;/span&gt; c.Save();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 13: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 14: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 15: &lt;/span&gt; &lt;span class="rem"&gt;//Remove comment to delete
the property from the doctype&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 16: &lt;/span&gt; &lt;span class="rem"&gt;//i.delete();&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 17: &lt;/span&gt; &lt;span class="rem"&gt;//ct.Save();&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 18: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 19: &lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
As you can see, I’ve used a&amp;#160; few hard coded values. &lt;strong&gt;_advertiser&lt;/strong&gt; is
the alias of the document type and &lt;strong&gt;linkToSpecial&lt;/strong&gt; is the alias of
the property that I wanted to add on the Document type. If you want to delete the
property&amp;#160; remove&amp;#160; lines 9-13 and remove the comment on line 16 and 17. You
can use this code in a usercontrol and use that usercontrol as a dashboard control. &lt;strong&gt;Needless
to say, this code comes without a warranty.&lt;/strong&gt; 
&lt;/p&gt;
&lt;p&gt;
I’ve added &lt;a href="http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=24871" target="_blank"&gt;the
issue to codeplex&lt;/a&gt;, please vote for it!. Hope this post is a nice work around for
the issue.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=bdc34020-7c06-49ca-ae62-9c1b4cbbacbd" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,bdc34020-7c06-49ca-ae62-9c1b4cbbacbd.aspx</comments>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=deef886b-bb23-4fa3-8efd-07bf9c7a4140</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,deef886b-bb23-4fa3-8efd-07bf9c7a4140.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,deef886b-bb23-4fa3-8efd-07bf9c7a4140.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=deef886b-bb23-4fa3-8efd-07bf9c7a4140</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just a little quick tip. When you install Umbraco v4.0.2.1 (don't know about other
versions) without runway and you publish your site, you will see a blank screen. This
is because the data/umbraco.config file contains the runway site as you can see in
the sample xml below.  
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;!</span>
          <span class="html">DOCTYPE</span>
          <span class="attr">umbraco</span>[
&amp;<span class="attr">lt</span>;!<span class="attr">ELEMENT</span><span class="attr">nodes</span><span class="attr">ANY</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;!</span><span class="html">ELEMENT</span><span class="attr">node</span><span class="attr">ANY</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;!</span><span class="html">ATTLIST</span><span class="attr">node</span><span class="attr">id</span><span class="attr">ID</span> #<span class="attr">REQUIRED</span><span class="kwrd">&gt;</span> ]<span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">root</span><span class="attr">id</span><span class="kwrd">="-1"</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">node</span><span class="attr">id</span><span class="kwrd">="1048"</span><span class="attr">version</span><span class="kwrd">="6f0d47e7-8cf1-43e5-a5ad-c687e0b78331"</span><span class="attr">parentID</span><span class="kwrd">="-1"</span><span class="attr">level</span><span class="kwrd">="1"</span><span class="attr">writerID</span><span class="kwrd">="0"</span><br /><span class="attr">creatorID</span><span class="kwrd">="0"</span><span class="attr">nodeType</span><span class="kwrd">="1045"</span><span class="attr">template</span><span class="kwrd">="1042"</span><span class="attr">sortOrder</span><span class="kwrd">="2"</span><br /><span class="attr">createDate</span><span class="kwrd">="2008-05-02T09:52:36"</span><span class="attr">updateDate</span><span class="kwrd">="2009-02-18T10:19:26"</span><span class="attr">nodeName</span><span class="kwrd">="Runway
Homepage"</span><br /><span class="attr">urlName</span><span class="kwrd">="runway-homepage"</span><span class="attr">writerName</span><span class="kwrd">="Administrator"</span><br /><span class="attr">creatorName</span><span class="kwrd">="Administrator"</span><span class="attr">nodeTypeAlias</span><span class="kwrd">="RunwayHomepage"</span><span class="attr">path</span><span class="kwrd">="-1,1048"</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">data</span><span class="attr">alias</span><span class="kwrd">="bodyText"</span><span class="kwrd">&gt;&lt;!</span>[CDATA[<span class="kwrd">&lt;</span><span class="html">p</span><span class="kwrd">&gt;</span>Runway
gives you a bare-bones website that introduces you to a set of 
<br />
well-defined conventions for building an umbraco website.<span class="kwrd">&lt;/</span><span class="html">p</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">p</span><span class="kwrd">&gt;</span>The
Runway website is very simple in form and provided without any design or functionality. 
<br />
By installing Runway, you<span class="attr">&amp;rsquo;<br /></span>ll begin with a minimal site built on best practices. You<span class="attr">&amp;rsquo;</span>ll
also enjoy the benefits of 
<br />
speaking the same <span class="attr">&amp;ldquo;</span>language<span class="attr">&amp;rdquo;</span><br />
as the rest of the umbraco community by using common properties and naming conventions.<span class="kwrd">&lt;/</span><span class="html">p</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">p</span><span class="kwrd">&gt;</span>Now
that you know what Runway is, it is time to get started using Runway.<span class="kwrd">&lt;/</span><span class="html">p</span><span class="kwrd">&gt;</span>]]<span class="kwrd">&gt;&lt;/</span><span class="html">data</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">data</span><span class="attr">alias</span><span class="kwrd">="siteName"</span><span class="kwrd">&gt;</span>Runway<span class="kwrd">&lt;/</span><span class="html">data</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">data</span><span class="attr">alias</span><span class="kwrd">="siteDescription"</span><span class="kwrd">&gt;&lt;!</span>[CDATA[Off
to a great start]]<span class="kwrd">&gt;&lt;/</span><span class="html">data</span><span class="kwrd">&gt;</span> ..................... <span class="kwrd">&lt;/</span><span class="html">node</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;/</span><span class="html">root</span><span class="kwrd">&gt;</span></pre>
        <p>
          <span class="kwrd">Work around for this issue is to republish the entire site first.
I've added this issue to codeplex. <a href="http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=24176" target="_blank">Please
vote here</a>.</span>
        </p>
        <style type="text/css">


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=deef886b-bb23-4fa3-8efd-07bf9c7a4140" />
      </body>
      <title>Empty site when using Umbraco v4.0.2.1 without runway</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,deef886b-bb23-4fa3-8efd-07bf9c7a4140.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/08/10/EmptySiteWhenUsingUmbracoV4021WithoutRunway.aspx</link>
      <pubDate>Mon, 10 Aug 2009 18:18:04 GMT</pubDate>
      <description>&lt;p&gt;
Just a little quick tip. When you install Umbraco v4.0.2.1 (don't know about other
versions) without runway and you publish your site, you will see a blank screen. This
is because the data/umbraco.config file contains the runway site as you can see in
the sample xml below.&amp;nbsp; 
&lt;/p&gt;
&lt;pre class=csharpcode&gt;&lt;span class=kwrd&gt;&amp;lt;!&lt;/span&gt;&lt;span class=html&gt;DOCTYPE&lt;/span&gt; &lt;span class=attr&gt;umbraco&lt;/span&gt;[
&amp;amp;&lt;span class=attr&gt;lt&lt;/span&gt;;!&lt;span class=attr&gt;ELEMENT&lt;/span&gt; &lt;span class=attr&gt;nodes&lt;/span&gt; &lt;span class=attr&gt;ANY&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt; &lt;span class=kwrd&gt;&amp;lt;!&lt;/span&gt;&lt;span class=html&gt;ELEMENT&lt;/span&gt; &lt;span class=attr&gt;node&lt;/span&gt; &lt;span class=attr&gt;ANY&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt; &lt;span class=kwrd&gt;&amp;lt;!&lt;/span&gt;&lt;span class=html&gt;ATTLIST&lt;/span&gt; &lt;span class=attr&gt;node&lt;/span&gt; &lt;span class=attr&gt;id&lt;/span&gt; &lt;span class=attr&gt;ID&lt;/span&gt; #&lt;span class=attr&gt;REQUIRED&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt; ]&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt; &lt;span class=kwrd&gt;&amp;lt;&lt;/span&gt;&lt;span class=html&gt;root&lt;/span&gt; &lt;span class=attr&gt;id&lt;/span&gt;&lt;span class=kwrd&gt;="-1"&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt; &lt;span class=kwrd&gt;&amp;lt;&lt;/span&gt;&lt;span class=html&gt;node&lt;/span&gt; &lt;span class=attr&gt;id&lt;/span&gt;&lt;span class=kwrd&gt;="1048"&lt;/span&gt; &lt;span class=attr&gt;version&lt;/span&gt;&lt;span class=kwrd&gt;="6f0d47e7-8cf1-43e5-a5ad-c687e0b78331"&lt;/span&gt; &lt;span class=attr&gt;parentID&lt;/span&gt;&lt;span class=kwrd&gt;="-1"&lt;/span&gt; &lt;span class=attr&gt;level&lt;/span&gt;&lt;span class=kwrd&gt;="1"&lt;/span&gt; &lt;span class=attr&gt;writerID&lt;/span&gt;&lt;span class=kwrd&gt;="0"&lt;/span&gt; 
&lt;br&gt;
&lt;span class=attr&gt;creatorID&lt;/span&gt;&lt;span class=kwrd&gt;="0"&lt;/span&gt; &lt;span class=attr&gt;nodeType&lt;/span&gt;&lt;span class=kwrd&gt;="1045"&lt;/span&gt; &lt;span class=attr&gt;template&lt;/span&gt;&lt;span class=kwrd&gt;="1042"&lt;/span&gt; &lt;span class=attr&gt;sortOrder&lt;/span&gt;&lt;span class=kwrd&gt;="2"&lt;/span&gt; 
&lt;br&gt;
&lt;span class=attr&gt;createDate&lt;/span&gt;&lt;span class=kwrd&gt;="2008-05-02T09:52:36"&lt;/span&gt; &lt;span class=attr&gt;updateDate&lt;/span&gt;&lt;span class=kwrd&gt;="2009-02-18T10:19:26"&lt;/span&gt; &lt;span class=attr&gt;nodeName&lt;/span&gt;&lt;span class=kwrd&gt;="Runway
Homepage"&lt;/span&gt; 
&lt;br&gt;
&lt;span class=attr&gt;urlName&lt;/span&gt;&lt;span class=kwrd&gt;="runway-homepage"&lt;/span&gt; &lt;span class=attr&gt;writerName&lt;/span&gt;&lt;span class=kwrd&gt;="Administrator"&lt;/span&gt; 
&lt;br&gt;
&lt;span class=attr&gt;creatorName&lt;/span&gt;&lt;span class=kwrd&gt;="Administrator"&lt;/span&gt; &lt;span class=attr&gt;nodeTypeAlias&lt;/span&gt;&lt;span class=kwrd&gt;="RunwayHomepage"&lt;/span&gt; &lt;span class=attr&gt;path&lt;/span&gt;&lt;span class=kwrd&gt;="-1,1048"&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt; &lt;span class=kwrd&gt;&amp;lt;&lt;/span&gt;&lt;span class=html&gt;data&lt;/span&gt; &lt;span class=attr&gt;alias&lt;/span&gt;&lt;span class=kwrd&gt;="bodyText"&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&amp;lt;!&lt;/span&gt;[CDATA[&lt;span class=kwrd&gt;&amp;lt;&lt;/span&gt;&lt;span class=html&gt;p&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt;Runway
gives you a bare-bones website that introduces you to a set of 
&lt;br&gt;
well-defined conventions for building an umbraco website.&lt;span class=kwrd&gt;&amp;lt;/&lt;/span&gt;&lt;span class=html&gt;p&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt; &lt;span class=kwrd&gt;&amp;lt;&lt;/span&gt;&lt;span class=html&gt;p&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt;The
Runway website is very simple in form and provided without any design or functionality. 
&lt;br&gt;
By installing Runway, you&lt;span class=attr&gt;&amp;amp;rsquo;&lt;br&gt;
&lt;/span&gt;ll begin with a minimal site built on best practices. You&lt;span class=attr&gt;&amp;amp;rsquo;&lt;/span&gt;ll
also enjoy the benefits of 
&lt;br&gt;
speaking the same &lt;span class=attr&gt;&amp;amp;ldquo;&lt;/span&gt;language&lt;span class=attr&gt;&amp;amp;rdquo;&lt;/span&gt; 
&lt;br&gt;
as the rest of the umbraco community by using common properties and naming conventions.&lt;span class=kwrd&gt;&amp;lt;/&lt;/span&gt;&lt;span class=html&gt;p&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt; &lt;span class=kwrd&gt;&amp;lt;&lt;/span&gt;&lt;span class=html&gt;p&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt;Now
that you know what Runway is, it is time to get started using Runway.&lt;span class=kwrd&gt;&amp;lt;/&lt;/span&gt;&lt;span class=html&gt;p&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt;]]&lt;span class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=html&gt;data&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt; &lt;span class=kwrd&gt;&amp;lt;&lt;/span&gt;&lt;span class=html&gt;data&lt;/span&gt; &lt;span class=attr&gt;alias&lt;/span&gt;&lt;span class=kwrd&gt;="siteName"&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt;Runway&lt;span class=kwrd&gt;&amp;lt;/&lt;/span&gt;&lt;span class=html&gt;data&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt; &lt;span class=kwrd&gt;&amp;lt;&lt;/span&gt;&lt;span class=html&gt;data&lt;/span&gt; &lt;span class=attr&gt;alias&lt;/span&gt;&lt;span class=kwrd&gt;="siteDescription"&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&amp;lt;!&lt;/span&gt;[CDATA[Off
to a great start]]&lt;span class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=html&gt;data&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt; ..................... &lt;span class=kwrd&gt;&amp;lt;/&lt;/span&gt;&lt;span class=html&gt;node&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt; &lt;span class=kwrd&gt;&amp;lt;/&lt;/span&gt;&lt;span class=html&gt;root&lt;/span&gt;&lt;span class=kwrd&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;span class=kwrd&gt;Work around for this issue is to republish the entire site first.
I've added this issue to codeplex. &lt;a href="http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=24176" target=_blank&gt;Please
vote here&lt;/a&gt;.&lt;/span&gt;
&lt;/p&gt;
&lt;style type=text/css&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=deef886b-bb23-4fa3-8efd-07bf9c7a4140" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,deef886b-bb23-4fa3-8efd-07bf9c7a4140.aspx</comments>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=79b35431-6f38-43e6-ae34-3a3e428892d5</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,79b35431-6f38-43e6-ae34-3a3e428892d5.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,79b35431-6f38-43e6-ae34-3a3e428892d5.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=79b35431-6f38-43e6-ae34-3a3e428892d5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm very pleased to announce that I finally released the V1 version of UmbImport.
For those of you who don't know what UmbImport is:
</p>
        <p>
UmbImport helps you import content or members from any datasource into <a href="http://www.umbraco.org">Umbraco</a>.
The following datasources are supported by default: 
</p>
        <ul>
          <li>
SQL Server 
</li>
          <li>
CSV file 
</li>
          <li>
XML file 
</li>
        </ul>
        <p>
You can also create your own custom DataAdapter. Check out the following links to
screencasts to see the power of UmbImport.  
</p>
        <ul>
          <li>
            <a href="http://www.richardsoeteman.net/PermaLink,guid,189035af-bbc0-4d3f-8d54-9782c06794e7.aspx">Import
content  </a>
          </li>
          <li>
            <a href="http://www.vimeo.com/3853997">Import members</a>
          </li>
        </ul>
        <p>
The package is added to <a href="http://our.umbraco.org/" target="_blank">our.umbraco.org</a> the
new <a title="Umbraco" href="http://www.umbraco.org" target="_blank">Umbraco</a> community
site , so you can <a href="http://our.umbraco.org/projects/umbimport" target="_blank">download</a> it
there or use the <a href="http://umbimport.soetemansoftware.nl/" target="_blank">UmbImport</a> site.
On <a href="http://our.umbraco.org/" target="_blank">our.umbraco.org</a> you will
find a forum also where you can drop your questions/feature requests/ bugs etc. In
August I will release a manual also. If you find any issues please report it on the
forum or comment on this post.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=79b35431-6f38-43e6-ae34-3a3e428892d5" />
      </body>
      <title>UmbImport V1 released</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,79b35431-6f38-43e6-ae34-3a3e428892d5.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/06/30/UmbImportV1Released.aspx</link>
      <pubDate>Tue, 30 Jun 2009 07:43:08 GMT</pubDate>
      <description>&lt;p&gt;
I'm very pleased to announce that I finally released the V1 version of UmbImport.
For those of you who don't know what UmbImport is:
&lt;/p&gt;
&lt;p&gt;
UmbImport helps you import content or members from any datasource into &lt;a href="http://www.umbraco.org"&gt;Umbraco&lt;/a&gt;.
The following datasources are supported by default: 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
SQL Server 
&lt;/li&gt;
&lt;li&gt;
CSV file 
&lt;/li&gt;
&lt;li&gt;
XML file 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
You can also create your own custom DataAdapter. Check out the following links to
screencasts to see the power of UmbImport.&amp;#160; 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.richardsoeteman.net/PermaLink,guid,189035af-bbc0-4d3f-8d54-9782c06794e7.aspx"&gt;Import
content&amp;#160; &lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.vimeo.com/3853997"&gt;Import members&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The package is added to &lt;a href="http://our.umbraco.org/" target="_blank"&gt;our.umbraco.org&lt;/a&gt; the
new &lt;a title="Umbraco" href="http://www.umbraco.org" target="_blank"&gt;Umbraco&lt;/a&gt; community
site , so you can &lt;a href="http://our.umbraco.org/projects/umbimport" target="_blank"&gt;download&lt;/a&gt; it
there or use the &lt;a href="http://umbimport.soetemansoftware.nl/" target="_blank"&gt;UmbImport&lt;/a&gt; site.
On &lt;a href="http://our.umbraco.org/" target="_blank"&gt;our.umbraco.org&lt;/a&gt; you will
find a forum also where you can drop your questions/feature requests/ bugs etc. In
August I will release a manual also. If you find any issues please report it on the
forum or comment on this post.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=79b35431-6f38-43e6-ae34-3a3e428892d5" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,79b35431-6f38-43e6-ae34-3a3e428892d5.aspx</comments>
      <category>UmbImport</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=ec1b9387-aef3-47c9-86d8-eb9cb917baff</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,ec1b9387-aef3-47c9-86d8-eb9cb917baff.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,ec1b9387-aef3-47c9-86d8-eb9cb917baff.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ec1b9387-aef3-47c9-86d8-eb9cb917baff</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In February I wrote this blogpost which describes the process of how to add a menu
item to the context menu using the Umbraco V4 Event system. In UmbImport PRO I've
used this mechanism. When I was testing this I came across a bug in my code when using
a pagepicker, this was showing an empty tree in the node picker.
</p>
        <p>
 <img height="153" alt="EmptynodePicker" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/UpdateAddingmenuitemsusingtheeventsystem_126B9/EmptynodePicker_273f8b38-a34b-4bb0-80be-d2c832c2a354.jpg" width="301" border="0" /></p>
        <p>
Then I got a little flashback to the level 2 course I attended last November where
Niels told us to check if there was a menu attached to the node (which is not the
case for the pagepicker) before adding menu items to it, otherwise an exception is
thrown what will result in an empty tree. This is what happened in my case. In the
example below I've only added <strong>node.Menu!= </strong><span class="kwrd"><strong>null </strong>check
and now everything is working fine.</span></p>
        <p>
 
</p>
        <div class="csharpcode">
          <pre>
            <span class="lnum"> 1: </span>
            <span class="kwrd">using</span> System;</pre>
          <pre>
            <span class="lnum"> 2: </span>
            <span class="kwrd">using</span> umbraco.BusinessLogic;</pre>
          <pre>
            <span class="lnum"> 3: </span>
            <span class="kwrd">using</span> umbraco.cms.presentation.Trees;</pre>
          <pre>
            <span class="lnum"> 4: </span>
            <span class="kwrd">using</span> umbraco.interfaces;</pre>
          <pre>
            <span class="lnum"> 5: </span> </pre>
          <pre>
            <span class="lnum"> 6: </span>
            <span class="kwrd">namespace</span> UnpublishAction</pre>
          <pre>
            <span class="lnum"> 7: </span>{</pre>
          <pre>
            <span class="lnum"> 8: </span>
            <span class="rem">/// &lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 9: </span>
            <span class="rem">/// Add unpublish to the menu
item</span>
          </pre>
          <pre>
            <span class="lnum"> 10: </span>
            <span class="rem">/// &lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 11: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">class</span> AddUnpublishActionEvent
:ApplicationBase</pre>
          <pre>
            <span class="lnum"> 12: </span> {</pre>
          <pre>
            <span class="lnum"> 13: </span>
            <span class="kwrd">public</span> AddUnpublishActionEvent()</pre>
          <pre>
            <span class="lnum"> 14: </span> {</pre>
          <pre>
            <span class="lnum"> 15: </span> BaseContentTree.BeforeNodeRender += <span class="kwrd">new</span> BaseTree.BeforeNodeRenderEventHandler(BaseTree_BeforeNodeRender);</pre>
          <pre>
            <span class="lnum"> 16: </span> }</pre>
          <pre>
            <span class="lnum"> 17: </span> </pre>
          <pre>
            <span class="lnum"> 18: </span>
            <span class="rem">/// &lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 19: </span>
            <span class="rem">/// Before a menu item gets
rendered we will add the unpublish action if the document is published</span>
          </pre>
          <pre>
            <span class="lnum"> 20: </span>
            <span class="rem">/// &lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 21: </span>
            <span class="kwrd">private</span>
            <span class="kwrd">void</span> BaseTree_BeforeNodeRender(<span class="kwrd">ref</span> XmlTree
sender, <span class="kwrd">ref</span> XmlTreeNode node, EventArgs e)</pre>
          <pre>
            <span class="lnum"> 22: </span> {</pre>
          <pre>
            <span class="lnum"> 23: </span>
            <span class="rem">///Only unpublish when published</span>
          </pre>
          <pre>
            <span class="lnum"> 24: </span>
            <span class="kwrd">if</span> (<strong>node.Menu!= <span class="kwrd">null</span></strong> &amp;&amp;
!node.NotPublished.GetValueOrDefault(<span class="kwrd">true</span>))</pre>
          <pre>
            <span class="lnum"> 25: </span> {</pre>
          <pre>
            <span class="lnum"> 26: </span>
            <span class="rem">//Find the publish action and
add 1 for the index</span>
          </pre>
          <pre>
            <span class="lnum"> 27: </span>
            <span class="kwrd">int</span> index = node.Menu.FindIndex(<span class="kwrd">delegate</span>(IAction
a) { <span class="kwrd">return</span> a.Alias == <span class="str">"publish"</span>;
})+1;</pre>
          <pre>
            <span class="lnum"> 28: </span> </pre>
          <pre>
            <span class="lnum"> 29: </span>
            <span class="rem">//Insert unpublish action</span>
          </pre>
          <pre>
            <span class="lnum"> 30: </span> node.Menu.Insert(index, UnpublishAction.Instance);</pre>
          <pre>
            <span class="lnum"> 31: </span> }</pre>
          <pre>
            <span class="lnum"> 32: </span> }</pre>
          <pre>
            <span class="lnum"> 33: </span> }</pre>
          <pre>
            <span class="lnum"> 34: </span>}</pre>
          <pre>
            <span class="lnum"> 35: </span> </pre>
        </div>
        <style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
          <a href="http://www.richardsoeteman.net/downloads/Umbraco/Unpublishmenuitem.zip" target="_blank">Download
Source</a>
        </p>
        <p>
Hope it didn't get you into trouble, sorry if it did.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=ec1b9387-aef3-47c9-86d8-eb9cb917baff" />
      </body>
      <title>Update: Adding menu items using the event system</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,ec1b9387-aef3-47c9-86d8-eb9cb917baff.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/05/04/UpdateAddingMenuItemsUsingTheEventSystem.aspx</link>
      <pubDate>Mon, 04 May 2009 19:06:31 GMT</pubDate>
      <description>&lt;p&gt;
In February I wrote this blogpost which describes the process of how to add a menu
item to the context menu using the Umbraco V4 Event system. In UmbImport PRO I've
used this mechanism. When I was testing this I came across a bug in my code when using
a pagepicker, this was showing an empty tree in the node picker.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&lt;img height="153" alt="EmptynodePicker" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/UpdateAddingmenuitemsusingtheeventsystem_126B9/EmptynodePicker_273f8b38-a34b-4bb0-80be-d2c832c2a354.jpg" width="301" border="0" /&gt; 
&lt;/p&gt;
&lt;p&gt;
Then I got a little flashback to the level 2 course I attended last November where
Niels told us to check if there was a menu attached to the node (which is not the
case for the pagepicker) before adding menu items to it, otherwise an exception is
thrown what will result in an empty tree. This is what happened in my case. In the
example below I've only added &lt;strong&gt;node.Menu!= &lt;/strong&gt;&lt;span class="kwrd"&gt;&lt;strong&gt;null &lt;/strong&gt;check
and now everything is working fine.&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 2: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; umbraco.BusinessLogic;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 3: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; umbraco.cms.presentation.Trees;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 4: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; umbraco.interfaces;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 5: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 6: &lt;/span&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; UnpublishAction&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 7: &lt;/span&gt;{&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 8: &lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 9: &lt;/span&gt; &lt;span class="rem"&gt;/// Add unpublish to the menu
item&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 10: &lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 11: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; AddUnpublishActionEvent
:ApplicationBase&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 12: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 13: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; AddUnpublishActionEvent()&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 14: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 15: &lt;/span&gt; BaseContentTree.BeforeNodeRender += &lt;span class="kwrd"&gt;new&lt;/span&gt; BaseTree.BeforeNodeRenderEventHandler(BaseTree_BeforeNodeRender);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 16: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 17: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 18: &lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 19: &lt;/span&gt; &lt;span class="rem"&gt;/// Before a menu item gets
rendered we will add the unpublish action if the document is published&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 20: &lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 21: &lt;/span&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; BaseTree_BeforeNodeRender(&lt;span class="kwrd"&gt;ref&lt;/span&gt; XmlTree
sender, &lt;span class="kwrd"&gt;ref&lt;/span&gt; XmlTreeNode node, EventArgs e)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 22: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 23: &lt;/span&gt; &lt;span class="rem"&gt;///Only unpublish when published&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 24: &lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;strong&gt;node.Menu!= &lt;span class="kwrd"&gt;null&lt;/span&gt;&lt;/strong&gt; &amp;amp;&amp;amp;
!node.NotPublished.GetValueOrDefault(&lt;span class="kwrd"&gt;true&lt;/span&gt;))&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 25: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 26: &lt;/span&gt; &lt;span class="rem"&gt;//Find the publish action and
add 1 for the index&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 27: &lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; index = node.Menu.FindIndex(&lt;span class="kwrd"&gt;delegate&lt;/span&gt;(IAction
a) { &lt;span class="kwrd"&gt;return&lt;/span&gt; a.Alias == &lt;span class="str"&gt;&amp;quot;publish&amp;quot;&lt;/span&gt;;
})+1;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 28: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 29: &lt;/span&gt; &lt;span class="rem"&gt;//Insert unpublish action&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 30: &lt;/span&gt; node.Menu.Insert(index, UnpublishAction.Instance);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 31: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 32: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 33: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 34: &lt;/span&gt;}&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 35: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/downloads/Umbraco/Unpublishmenuitem.zip" target="_blank"&gt;Download
Source&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Hope it didn't get you into trouble, sorry if it did.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=ec1b9387-aef3-47c9-86d8-eb9cb917baff" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,ec1b9387-aef3-47c9-86d8-eb9cb917baff.aspx</comments>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=88590237-db9a-4d5c-b718-c5986249d877</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,88590237-db9a-4d5c-b718-c5986249d877.aspx</pingback:target>
      <dc:creator>Your DisplayName here!</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,88590237-db9a-4d5c-b718-c5986249d877.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=88590237-db9a-4d5c-b718-c5986249d877</wfw:commentRss>
      <title>Create a custom data adapter for UmbImport part 1</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,88590237-db9a-4d5c-b718-c5986249d877.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/04/16/CreateACustomDataAdapterForUmbImportPart1.aspx</link>
      <pubDate>Thu, 16 Apr 2009 22:02:37 GMT</pubDate>
      <description>&lt;h3&gt;The source code is updated for CMSImport 1.0.3, download it at the bottom of this
post!
&lt;/h3&gt;
&lt;p&gt;
As I mentioned earlier it's possible to create a custom data adapter which can be
plugged into umbImport. The free edition supports one custom data adapter, the pro
edition will support multiple adapters. In this multi part series I will demonstrate
how you can create your own data adapter by building an RSS import adapter. In this
first part we will create the basic adapter in later post we will refine the functionality.
For this first part I've installed &lt;a href="http://umbraco.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=18661" target="_blank"&gt;Umbraco
4.0.1&lt;/a&gt; and the packages &lt;a href="http://www.codeplex.com/blog4umbraco" target="_blank"&gt;Blog4Umbraco&lt;/a&gt; and &lt;a href="http://umbimport.soetemansoftware.nl/" target="_blank"&gt;UmbImport
beta 1&lt;/a&gt;. 
&lt;/p&gt;
&lt;h4&gt;Create the adapter
&lt;/h4&gt;
&lt;p&gt;
You can create a custom data adapter by deriving from two classes:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
UmbImportLibrary.BaseTypes.ImportDataAdapter. 
&lt;/li&gt;
&lt;li&gt;
UmbImportLibrary.BaseTypes.ImportDataUI. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The ImportDataAdapter class provides the real communication to the datasource and
holds a reference to the ImportDataUI class which is responsible for the user input.
For our RSS import adapter we will start by creating the UI class. 
&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; RSSDataAdapterUI
: ImportDataUI&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 2: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 3: &lt;/span&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; Panel _rssContentPanel
= &lt;span class="kwrd"&gt;new&lt;/span&gt; Panel();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 4: &lt;/span&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; Literal _selectRssSourceLiteral
= &lt;span class="kwrd"&gt;new&lt;/span&gt; Literal();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 5: &lt;/span&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; TextBox _rssLocation
= &lt;span class="kwrd"&gt;new&lt;/span&gt; TextBox();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 6: &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 7: &lt;/span&gt; &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; OnInit(EventArgs
e)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 8: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 9: &lt;/span&gt; &lt;span class="kwrd"&gt;base&lt;/span&gt;.OnInit(e);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 10: &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 11: &lt;/span&gt; _rssContentPanel.ID = &lt;span class="str"&gt;"RssContentPanel"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 12: &lt;/span&gt; _selectRssSourceLiteral.ID = &lt;span class="str"&gt;"SelectRssSourceLiteral"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 13: &lt;/span&gt; _selectRssSourceLiteral.Text = &lt;span class="str"&gt;"Specify
the RSSLocation"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 14: &lt;/span&gt; _rssLocation.ID = &lt;span class="str"&gt;"RssLocation"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 15: &lt;/span&gt; _rssLocation.Width = 400;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 16: &lt;/span&gt; _rssContentPanel.Controls.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; LiteralControl(&lt;span class="str"&gt;"&lt;table&gt;
&lt;tr&gt;
&lt;td width=\"150\"&gt;
"
&lt;/span&gt;));&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 17: &lt;/span&gt; _rssContentPanel.Controls.Add(_selectRssSourceLiteral);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 18: &lt;/span&gt; _rssContentPanel.Controls.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; LiteralControl(&lt;span class="str"&gt;"&gt;
&lt;td&gt;
"
&lt;/span&gt;));&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 19: &lt;/span&gt; _rssContentPanel.Controls.Add(_rssLocation);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 20: &lt;/span&gt; _rssContentPanel.Controls.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; LiteralControl(&lt;span class="str"&gt;"
example http://feeds.feedburner.com/umbracoblog &gt;
&gt;
&gt;
"&lt;/span&gt;));&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 21: &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 22: &lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.Controls.Add(_rssContentPanel);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 23: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 24: &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 25: &lt;/span&gt; &lt;span class="rem"&gt;/// 
&lt;summary&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 26: &lt;/span&gt; &lt;span class="rem"&gt;/// Returns the Datasource&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 27: &lt;/span&gt; &lt;span class="rem"&gt;/// &gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 28: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; DataSource&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 29: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 30: &lt;/span&gt; get&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 31: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 32: &lt;/span&gt; &lt;span class="kwrd"&gt;return&lt;/span&gt; _rssLocation.Text;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 33: &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 34: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 35: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 36: &lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
The OnInit method generates the form. The only real interesting thing in this class
is the datasource property. This will be used in UmbImport to initialize the import
with the selected datasource.
&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; RSSDataAdapter
: ImportDataAdapter&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 2: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 3: &lt;/span&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; ImportDataUI
_xmlImportUI;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 4: &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 5: &lt;/span&gt; &lt;span class="rem"&gt;/// 
&lt;summary&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 6: &lt;/span&gt; &lt;span class="rem"&gt;/// Alias of the import adapter&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 7: &lt;/span&gt; &lt;span class="rem"&gt;/// &gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 8: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Alias&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 9: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 10: &lt;/span&gt; get { &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;"RssImport"&lt;/span&gt;;
}&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 11: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 12: &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 13: &lt;/span&gt; &lt;span class="rem"&gt;/// 
&lt;summary&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 14: &lt;/span&gt; &lt;span class="rem"&gt;/// Get XML Data&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 15: &lt;/span&gt; &lt;span class="rem"&gt;/// &gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 16: &lt;/span&gt; &lt;span class="rem"&gt;/// 
&lt;returns&gt;
&lt;/returns&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 17: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; IDataReader
GetData()&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 18: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 19: &lt;/span&gt; &lt;span class="kwrd"&gt;return&lt;/span&gt; XmlToDataReader(DataSource, &lt;span class="str"&gt;"//item"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 20: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 21: &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 22: &lt;/span&gt; &lt;span class="rem"&gt;/// 
&lt;summary&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 23: &lt;/span&gt; &lt;span class="rem"&gt;/// Validates the selected
datasource&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 24: &lt;/span&gt; &lt;span class="rem"&gt;/// &gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 25: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; Validate()&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 26: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 27: &lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; result = &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 28: &lt;/span&gt; &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 29: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 30: &lt;/span&gt; &lt;span class="kwrd"&gt;using&lt;/span&gt; (IDataReader
datareader = XmlToDataReader(DataSource, &lt;span class="str"&gt;"//item"&lt;/span&gt;))&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 31: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 32: &lt;/span&gt; result = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 33: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 34: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 35: &lt;/span&gt; &lt;span class="kwrd"&gt;catch&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 36: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 37: &lt;/span&gt; result = &lt;span class="kwrd"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 38: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 39: &lt;/span&gt; &lt;span class="kwrd"&gt;return&lt;/span&gt; result;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 40: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 41: &lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 42: &lt;/span&gt; &lt;span class="rem"&gt;/// 
&lt;summary&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 43: &lt;/span&gt; &lt;span class="rem"&gt;/// Holds a reference to the
UI control of the adapter&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 44: &lt;/span&gt; &lt;span class="rem"&gt;/// &gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 45: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; ImportDataUI
UIControl&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 46: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 47: &lt;/span&gt; get&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 48: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 49: &lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (_xmlImportUI == &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 50: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 51: &lt;/span&gt; _xmlImportUI = &lt;span class="kwrd"&gt;new&lt;/span&gt; RSSDataAdapterUI();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 52: &lt;/span&gt; _xmlImportUI.ID = &lt;span class="str"&gt;"RssImport"&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 53: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 54: &lt;/span&gt; &lt;span class="kwrd"&gt;return&lt;/span&gt; _xmlImportUI;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 55: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 56: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 57: &lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;/div&gt;
&lt;p&gt;
The Alias property will return the unique alias that we can use to select our adapter
during the Import process. The GetData method will return a datareader initialized
with the datasource. When importing XML it needs to be converted to a datareader first.
The ImportDataAdapter Base class has a method XmlToDataReader what will convert the
xml file to a datareader. The Validate method will check if the selected datasource
is valid. The UIControl property holds a reference to the RSSDataAdapterUI class.
The ImportDataAdapter base class has more properties/methods that you can override
but for this data adapter we are done.
&lt;/p&gt;
&lt;p&gt;
When you compile the project and put the DLL in the bin folder of the Umbraco install
the DLL will be picked up automatically by UmbImport.
&lt;/p&gt;
&lt;h4&gt;
&lt;/h4&gt;
&lt;h4&gt;Using the RSS import adapter
&lt;/h4&gt;
&lt;p&gt;
When you start UmbImport you will see in step 2 that you can select the RssImport
data adapter
&lt;/p&gt;
&lt;p&gt;
&lt;img height="457" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/CreateacustomdataadapterforumbImportpart_136ED/image_937ffe26-ea18-44a0-89ae-3dbfd38fda7a.png" width="723" border="0" /&gt; 
&lt;/p&gt;
&lt;p&gt;
In the next step we will see the form that we have created in the RSSDataAdapterUI
class. Here we can specify the RSS location.
&lt;/p&gt;
&lt;p&gt;
&lt;img height="457" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/CreateacustomdataadapterforumbImportpart_136ED/image_bb50e1c6-4187-4a60-987a-2ebe6fc03fa5.png" width="723" border="0" /&gt; 
&lt;/p&gt;
&lt;p&gt;
In the Next step we can specify the location where to store the blogposts (Note: When
using the Blog package blogposts will be arranged by data automatically) and we select
the blogpost as document type. In step 5 we will create the mapping between the fields
from the RSS feed and the Umbraco Document Properties. You will see a lot of other
fields from the RSS Feed. Just ignore them for now. In a later post we will filter
the columns.
&lt;/p&gt;
&lt;p&gt;
&lt;img height="506" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/CreateacustomdataadapterforumbImportpart_136ED/image_c33620e9-c43f-4a4d-8605-b2acd25539e3.png" width="723" border="0" /&gt; 
&lt;/p&gt;
&lt;h4&gt;The result
&lt;/h4&gt;
&lt;p&gt;
When you click next and next again on the confirm screen the RSS feed will be imported. 
&lt;/p&gt;
&lt;p&gt;
&lt;img height="506" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/CreateacustomdataadapterforumbImportpart_136ED/image_9cdd6c1c-3612-496a-95cc-df9dd6cd7703.png" width="723" border="0" /&gt; 
&lt;/p&gt;
&lt;p&gt;
In the next post I will show you how to Import the comment data with the same Adapter.
I will also show you how to filter the columns for the property mapping dropdowns.
When you want to play with this import adapter then &lt;a href="http://www.richardsoeteman.net/content/binary/RSSDataAdapter.rar" target="_blank"&gt;download
the source here.&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=88590237-db9a-4d5c-b718-c5986249d877" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,88590237-db9a-4d5c-b718-c5986249d877.aspx</comments>
      <category>UmbImport</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=3d85a1f8-9d7d-4dea-a592-8b6d84eac613</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,3d85a1f8-9d7d-4dea-a592-8b6d84eac613.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,3d85a1f8-9d7d-4dea-a592-8b6d84eac613.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=3d85a1f8-9d7d-4dea-a592-8b6d84eac613</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Last week I had a meeting with Nico Lubbers and we discussed the possibility of adding
Dictionary Items on the fly. You can read in <a href="http://www.nibble.be/?p=14" target="_blank">this
post from Tim</a> that it's been done before, but we want to make sure that it works
in every situation (Template, Usercontrol and Xslt) and we don't want a baseclass
for just adding items to the dictionary . Also we want logical keys (like savebuttonText,
companynameLabel etc.) instead of generated keys. Basically we want the pain of adding 
the dictionary items in the templates, usercontrols and xslt's  but we don't
want the pain of adding  the dictionary items in Umbraco manually. Now before
your read on I must warn you that the solution is not based on an architecture ;-)
</p>
        <h4>What happens if Umbraco can't find a dictionary item?
</h4>
        <p>
When you add a dictionary item on a template, usercontrol or XSLT and Umbraco can't
find it an exception is thrown. Umbraco will catch that exception and write it to
the tracelog. For this blogpost I've used a standard Umbraco 4.0.1 instance with Runway
and the modules contact form and standard navigation installed. In the example below
I'be added a few non existing Dictionary items to my code.
</p>
        <p>
          <strong>Template</strong>
        </p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">umbraco:Item</span>
          <span class="attr">field</span>
          <span class="kwrd">="#Template_DetailHeader"</span>
          <span class="attr">runat</span>
          <span class="kwrd">="server"</span>
          <span class="kwrd">&gt;&lt;/</span>
          <span class="html">umbraco:Item</span>
          <span class="kwrd">&gt;</span>
        </pre>
        <style type="text/css">





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
          <strong>XSLT</strong>
        </p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">xsl:value-of</span>
          <span class="attr">select</span>
          <span class="kwrd">="umbraco.library:GetDictionaryItem('XSLT_FromDictionary')"</span>
          <span class="kwrd">/&gt;</span>
        </pre>
        <p>
          <style type="text/css">





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
          <strong>Usercontrol Markup</strong>
        </p>
        <pre class="csharpcode">
          <span class="asp">&lt;%</span>=umbraco.library.GetDictionaryItem(<span class="str">"UserControl_Details"</span>) <span class="asp">%&gt;</span></pre>
        <p>
          <strong>Usercontrol Codebehind</strong>
        </p>
        <pre class="csharpcode">lb_name.Text = umbraco.library.GetDictionaryItem(<span class="str">"UserControl_LabelCaption"</span>); </pre>
        <p>
Now when you view the page you will see empty places instead of the dictionary values.
What's more interesting is to view the page with the queryparameter ?umbdebugshowtrace=true
what shows you the trace info of the page like the image below. 
</p>
        <p>
          <img height="480" alt="traceinfo" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Autoadddictionaryitemsanotherapprouch_EB82/traceinfo_74065c55-e1cf-4ae1-81d0-4b5e6d407af5.jpg" width="619" border="0" />  
</p>
        <h3>
        </h3>
        <h4>How can we get that data?
</h4>
        <p>
While it's nice that we can view the data, it would be great if we can parse the trace
info and automatically add the missing dictionary items. This can be done using a <a href="http://www.15seconds.com/Issue/020910.htm" target="_blank">Trace
Listener</a>, when an item is added to the trace you can configure 1 or more trace
listeners that recieve the message then we can parse. In the  Class below I derive
from the TraceListener class. The TraceListener methods calls the AddItemUnknown method
which check the message with a regular expression. If the message can be parsed the
unknow dictionary key is retrieved from the message and will be added to Umbraco.
To ensure we will see the value when we refresh the page the key will also be added
as the value for every language.
</p>
        <div class="csharpcode">
          <pre>
            <span class="lnum"> 1: </span>
            <span class="kwrd">using</span> System;</pre>
          <pre>
            <span class="lnum"> 2: </span>
            <span class="kwrd">using</span> System.Diagnostics;</pre>
          <pre>
            <span class="lnum"> 3: </span>
            <span class="kwrd">using</span> System.Text.RegularExpressions;</pre>
          <pre>
            <span class="lnum"> 4: </span>
            <span class="kwrd">using</span> umbraco.BusinessLogic;</pre>
          <pre>
            <span class="lnum"> 5: </span>
            <span class="kwrd">using</span> umbraco.cms.businesslogic.language;</pre>
          <pre>
            <span class="lnum"> 6: </span> </pre>
          <pre>
            <span class="lnum"> 7: </span>
            <span class="kwrd">namespace</span> SoetemanSoftware.Tools</pre>
          <pre>
            <span class="lnum"> 8: </span>{</pre>
          <pre>
            <span class="lnum"> 9: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">class</span> AddUnknownDictionaryItemsListener
: TraceListener</pre>
          <pre>
            <span class="lnum"> 10: </span> {</pre>
          <pre>
            <span class="lnum"> 11: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">override</span>
            <span class="kwrd">void</span> Fail(<span class="kwrd">string</span> message)</pre>
          <pre>
            <span class="lnum"> 12: </span> {</pre>
          <pre>
            <span class="lnum"> 13: </span> AddItemWhenUnknown(message);</pre>
          <pre>
            <span class="lnum"> 14: </span> }</pre>
          <pre>
            <span class="lnum"> 15: </span> </pre>
          <pre>
            <span class="lnum"> 16: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">override</span>
            <span class="kwrd">void</span> Fail(<span class="kwrd">string</span> message, <span class="kwrd">string</span> detailMessage)</pre>
          <pre>
            <span class="lnum"> 17: </span> {</pre>
          <pre>
            <span class="lnum"> 18: </span> AddItemWhenUnknown(message);</pre>
          <pre>
            <span class="lnum"> 19: </span> }</pre>
          <pre>
            <span class="lnum"> 20: </span> </pre>
          <pre>
            <span class="lnum"> 21: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">override</span>
            <span class="kwrd">void</span> Write(<span class="kwrd">string</span> message)</pre>
          <pre>
            <span class="lnum"> 22: </span> {</pre>
          <pre>
            <span class="lnum"> 23: </span> AddItemWhenUnknown(message);</pre>
          <pre>
            <span class="lnum"> 24: </span> }</pre>
          <pre>
            <span class="lnum"> 25: </span> </pre>
          <pre>
            <span class="lnum"> 26: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">override</span>
            <span class="kwrd">void</span> WriteLine(<span class="kwrd">string</span> message)</pre>
          <pre>
            <span class="lnum"> 27: </span> {</pre>
          <pre>
            <span class="lnum"> 28: </span> AddItemWhenUnknown(message);</pre>
          <pre>
            <span class="lnum"> 29: </span> }</pre>
          <pre>
            <span class="lnum"> 30: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">override</span>
            <span class="kwrd">void</span> WriteLine(<span class="kwrd">string</span> message, <span class="kwrd">string</span> category)</pre>
          <pre>
            <span class="lnum"> 31: </span> {</pre>
          <pre>
            <span class="lnum"> 32: </span> AddItemWhenUnknown(message);</pre>
          <pre>
            <span class="lnum"> 33: </span> }</pre>
          <pre>
            <span class="lnum"> 34: </span> </pre>
          <pre>
            <span class="lnum"> 35: </span>
            <span class="rem">/// &lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 36: </span>
            <span class="rem">/// Parse at the message </span>
          </pre>
          <pre>
            <span class="lnum"> 37: </span>
            <span class="rem">/// &lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 38: </span>
            <span class="rem">/// &lt;param name="message"&gt;&lt;/param&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 39: </span>
            <span class="kwrd">private</span>
            <span class="kwrd">void</span> AddItemWhenUnknown(<span class="kwrd">string</span> message)</pre>
          <pre>
            <span class="lnum"> 40: </span> {</pre>
          <pre>
            <span class="lnum"> 41: </span>
            <span class="kwrd">try</span>
          </pre>
          <pre>
            <span class="lnum"> 42: </span> {</pre>
          <pre>
            <span class="lnum"> 43: </span> Match match = Regex.Match(message, <span class="str">"(Error
returning dictionary item ')(.*)(' --)"</span>, RegexOptions.Multiline);</pre>
          <pre>
            <span class="lnum"> 44: </span>
            <span class="kwrd">if</span> (match.Groups.Count
&gt; 1)</pre>
          <pre>
            <span class="lnum"> 45: </span> {</pre>
          <pre>
            <span class="lnum"> 46: </span>
            <span class="rem">//Get key from the mach collection</span>
          </pre>
          <pre>
            <span class="lnum"> 47: </span>
            <span class="kwrd">string</span> key = match.Groups[2].Value;</pre>
          <pre>
            <span class="lnum"> 48: </span>
            <span class="rem">//Check if key is allready
in Umbraco</span>
          </pre>
          <pre>
            <span class="lnum"> 49: </span>
            <span class="kwrd">if</span> (!umbraco.cms.businesslogic.Dictionary.DictionaryItem.hasKey(key))</pre>
          <pre>
            <span class="lnum"> 50: </span> {</pre>
          <pre>
            <span class="lnum"> 51: </span>
            <span class="rem">//Add new key with default
value to Umbraco</span>
          </pre>
          <pre>
            <span class="lnum"> 52: </span>
            <span class="kwrd">int</span> dictionaryID =
umbraco.cms.businesslogic.Dictionary.DictionaryItem.addKey(key, <span class="kwrd">string</span>.Format(<span class="str">"[{0}]"</span>,
key));</pre>
          <pre>
            <span class="lnum"> 53: </span> </pre>
          <pre>
            <span class="lnum"> 54: </span> var dictionaryItem = <span class="kwrd">new</span> umbraco.cms.businesslogic.Dictionary.DictionaryItem(dictionaryID);</pre>
          <pre>
            <span class="lnum"> 55: </span>
            <span class="kwrd">foreach</span> (Language l <span class="kwrd">in</span> Language.getAll)</pre>
          <pre>
            <span class="lnum"> 56: </span> {</pre>
          <pre>
            <span class="lnum"> 57: </span> dictionaryItem.setValue(l.id, <span class="kwrd">string</span>.Format(<span class="str">"[{0}]"</span>,
key));</pre>
          <pre>
            <span class="lnum"> 58: </span> }</pre>
          <pre>
            <span class="lnum"> 59: </span> dictionaryItem.Save();</pre>
          <pre>
            <span class="lnum"> 60: </span> }</pre>
          <pre>
            <span class="lnum"> 61: </span> }</pre>
          <pre>
            <span class="lnum"> 62: </span> }</pre>
          <pre>
            <span class="lnum"> 63: </span>
            <span class="kwrd">catch</span> (Exception ex)</pre>
          <pre>
            <span class="lnum"> 64: </span> {</pre>
          <pre>
            <span class="lnum"> 65: </span>
            <span class="rem">//Logic may never break on
this Listener</span>
          </pre>
          <pre>
            <span class="lnum"> 66: </span> Log.Add(LogTypes.Error, -1, <span class="kwrd">string</span>.Format(<span class="str">"Error
in Dictionary listener when adding item to dictionary {0} "</span>, ex.Message));</pre>
          <pre>
            <span class="lnum"> 67: </span> }</pre>
          <pre>
            <span class="lnum"> 68: </span> }</pre>
          <pre>
            <span class="lnum"> 69: </span> }</pre>
          <pre>
            <span class="lnum"> 70: </span>}</pre>
        </div>
        <style type="text/css">




.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <h4>Configure the TraceListener
</h4>
        <p>
When you want to use the TraceListener you have to configure it in the web.config.
Add the following section to your web.config file.
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">system.diagnostics</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">trace</span>
          <span class="attr">autoflush</span>
          <span class="kwrd">="true"</span>
          <span class="attr">indentsize</span>
          <span class="kwrd">="4"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">listeners</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">remove</span>
          <span class="attr">name</span>
          <span class="kwrd">="Default"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">add</span>
          <span class="attr">name</span>
          <span class="kwrd">="AddDictionaryListener"</span>
          <span class="attr">type</span>
          <span class="kwrd">="SoetemanSoftware.Tools.AddUnknownDictionaryItemsListener,AddUnknownDictionaryItemsListener"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">listeners</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">trace</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">system.diagnostics</span>
          <span class="kwrd">&gt;</span>
        </pre>
        <p>
Also modify the existing Trace element by adding the <strong>writeToDiagnosticsTrace="true"</strong>.
This will forward the ASP.NET trace messages to our AddUnknownDictionaryItemsListener.
Simply set this attribute to false if you don't want the items to be added automatically.
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">trace</span>
          <span class="attr">enabled</span>
          <span class="kwrd">="true"</span>
          <span class="attr">requestLimit</span>
          <span class="kwrd">="10"</span>
          <span class="attr">pageOutput</span>
          <span class="kwrd">="false"</span>
          <span class="attr">traceMode</span>
          <span class="kwrd">="SortByTime"</span>
          <span class="attr">localOnly</span>
          <span class="kwrd">="true"</span>
          <span class="attr">writeToDiagnosticsTrace</span>
          <span class="kwrd">="true"</span>
          <span class="kwrd">/&gt;</span> </pre>
        <h4>View the output
</h4>
        <p>
When you configured the trace listener and hit the page again the missing dictionary
items are added to Umbraco.
</p>
        <p>
          <img height="142" alt="dictionary items" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Autoadddictionaryitemsanotherapprouch_EB82/dictionary%20items_9a585ac1-1043-48a2-a212-e45decd5713d.jpg" width="453" border="0" />
        </p>
        <p>
Refresh the page again and you will see the following output
</p>
        <p>
          <img height="480" alt="output" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Autoadddictionaryitemsanotherapprouch_EB82/output_80c7006f-fc9c-46bc-b4f2-d0d39e5c352a.jpg" width="619" border="0" />
        </p>
        <p>
Sometimes you will encounter caching issues. When you want to avoid that use the umbdebugshowtrace=true
querystring parameter which will prevent caching.
</p>
        <h3>
        </h3>
        <h4>Download
</h4>
        <p>
You can download the <a href="http://www.richardsoeteman.net/downloads/umbraco/AddUnknownDictionaryItemsListener.zip" target="_blank">DLL
here</a>. You can also dowload the <a href="http://www.richardsoeteman.net/downloads/umbraco/AddUnknownDictionaryItemsListener_source.zip" target="_blank">source
here</a>.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=3d85a1f8-9d7d-4dea-a592-8b6d84eac613" />
      </body>
      <title>Auto add dictionary items another approach</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,3d85a1f8-9d7d-4dea-a592-8b6d84eac613.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/04/01/AutoAddDictionaryItemsAnotherApproach.aspx</link>
      <pubDate>Wed, 01 Apr 2009 20:24:15 GMT</pubDate>
      <description>&lt;p&gt;
Last week I had a meeting with Nico Lubbers and we discussed the possibility of adding
Dictionary Items on the fly. You can read in &lt;a href="http://www.nibble.be/?p=14" target="_blank"&gt;this
post from Tim&lt;/a&gt; that it's been done before, but we want to make sure that it works
in every situation (Template, Usercontrol and Xslt) and we don't want a baseclass
for just adding items to the dictionary . Also we want logical keys (like savebuttonText,
companynameLabel etc.) instead of generated keys. Basically we want the pain of adding&amp;#160;
the dictionary items in the templates, usercontrols and xslt's&amp;#160; but we don't
want the pain of adding&amp;#160; the dictionary items in Umbraco manually. Now before
your read on I must warn you that the solution is not based on an architecture ;-)
&lt;/p&gt;
&lt;h4&gt;What happens if Umbraco can't find a dictionary item?
&lt;/h4&gt;
&lt;p&gt;
When you add a dictionary item on a template, usercontrol or XSLT and Umbraco can't
find it an exception is thrown. Umbraco will catch that exception and write it to
the tracelog. For this blogpost I've used a standard Umbraco 4.0.1 instance with Runway
and the modules contact form and standard navigation installed. In the example below
I'be added a few non existing Dictionary items to my code.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Template&lt;/strong&gt;
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;umbraco:Item&lt;/span&gt; &lt;span class="attr"&gt;field&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;#Template_DetailHeader&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;umbraco:Item&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
&lt;strong&gt;XSLT&lt;/strong&gt;
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;xsl:value-of&lt;/span&gt; &lt;span class="attr"&gt;select&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;umbraco.library:GetDictionaryItem('XSLT_FromDictionary')&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;style type="text/css"&gt;





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;strong&gt;Usercontrol Markup&lt;/strong&gt;
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=umbraco.library.GetDictionaryItem(&lt;span class="str"&gt;&amp;quot;UserControl_Details&amp;quot;&lt;/span&gt;) &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;strong&gt;Usercontrol Codebehind&lt;/strong&gt;
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;lb_name.Text = umbraco.library.GetDictionaryItem(&lt;span class="str"&gt;&amp;quot;UserControl_LabelCaption&amp;quot;&lt;/span&gt;); &lt;/pre&gt;
&lt;p&gt;
Now when you view the page you will see empty places instead of the dictionary values.
What's more interesting is to view the page with the queryparameter ?umbdebugshowtrace=true
what shows you the trace info of the page like the image below. 
&lt;/p&gt;
&lt;p&gt;
&lt;img height="480" alt="traceinfo" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Autoadddictionaryitemsanotherapprouch_EB82/traceinfo_74065c55-e1cf-4ae1-81d0-4b5e6d407af5.jpg" width="619" border="0" /&gt;&amp;#160; 
&lt;/p&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h4&gt;How can we get that data?
&lt;/h4&gt;
&lt;p&gt;
While it's nice that we can view the data, it would be great if we can parse the trace
info and automatically add the missing dictionary items. This can be done using a &lt;a href="http://www.15seconds.com/Issue/020910.htm" target="_blank"&gt;Trace
Listener&lt;/a&gt;, when an item is added to the trace you can configure 1 or more trace
listeners that recieve the message then we can parse. In the&amp;#160; Class below I derive
from the TraceListener class. The TraceListener methods calls the AddItemUnknown method
which check the message with a regular expression. If the message can be parsed the
unknow dictionary key is retrieved from the message and will be added to Umbraco.
To ensure we will see the value when we refresh the page the key will also be added
as the value for every language.
&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 2: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Diagnostics;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 3: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text.RegularExpressions;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 4: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; umbraco.BusinessLogic;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 5: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; umbraco.cms.businesslogic.language;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 6: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 7: &lt;/span&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; SoetemanSoftware.Tools&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 8: &lt;/span&gt;{&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 9: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; AddUnknownDictionaryItemsListener
: TraceListener&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 10: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 11: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Fail(&lt;span class="kwrd"&gt;string&lt;/span&gt; message)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 12: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 13: &lt;/span&gt; AddItemWhenUnknown(message);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 14: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 15: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 16: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Fail(&lt;span class="kwrd"&gt;string&lt;/span&gt; message, &lt;span class="kwrd"&gt;string&lt;/span&gt; detailMessage)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 17: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 18: &lt;/span&gt; AddItemWhenUnknown(message);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 19: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 20: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 21: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Write(&lt;span class="kwrd"&gt;string&lt;/span&gt; message)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 22: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 23: &lt;/span&gt; AddItemWhenUnknown(message);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 24: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 25: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 26: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; WriteLine(&lt;span class="kwrd"&gt;string&lt;/span&gt; message)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 27: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 28: &lt;/span&gt; AddItemWhenUnknown(message);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 29: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 30: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; WriteLine(&lt;span class="kwrd"&gt;string&lt;/span&gt; message, &lt;span class="kwrd"&gt;string&lt;/span&gt; category)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 31: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 32: &lt;/span&gt; AddItemWhenUnknown(message);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 33: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 34: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 35: &lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 36: &lt;/span&gt; &lt;span class="rem"&gt;/// Parse at the message &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 37: &lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 38: &lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;message&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 39: &lt;/span&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; AddItemWhenUnknown(&lt;span class="kwrd"&gt;string&lt;/span&gt; message)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 40: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 41: &lt;/span&gt; &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 42: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 43: &lt;/span&gt; Match match = Regex.Match(message, &lt;span class="str"&gt;&amp;quot;(Error
returning dictionary item ')(.*)(' --)&amp;quot;&lt;/span&gt;, RegexOptions.Multiline);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 44: &lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (match.Groups.Count
&amp;gt; 1)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 45: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 46: &lt;/span&gt; &lt;span class="rem"&gt;//Get key from the mach collection&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 47: &lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; key = match.Groups[2].Value;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 48: &lt;/span&gt; &lt;span class="rem"&gt;//Check if key is allready
in Umbraco&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 49: &lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (!umbraco.cms.businesslogic.Dictionary.DictionaryItem.hasKey(key))&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 50: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 51: &lt;/span&gt; &lt;span class="rem"&gt;//Add new key with default
value to Umbraco&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 52: &lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; dictionaryID =
umbraco.cms.businesslogic.Dictionary.DictionaryItem.addKey(key, &lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(&lt;span class="str"&gt;&amp;quot;[{0}]&amp;quot;&lt;/span&gt;,
key));&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 53: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 54: &lt;/span&gt; var dictionaryItem = &lt;span class="kwrd"&gt;new&lt;/span&gt; umbraco.cms.businesslogic.Dictionary.DictionaryItem(dictionaryID);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 55: &lt;/span&gt; &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (Language l &lt;span class="kwrd"&gt;in&lt;/span&gt; Language.getAll)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 56: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 57: &lt;/span&gt; dictionaryItem.setValue(l.id, &lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(&lt;span class="str"&gt;&amp;quot;[{0}]&amp;quot;&lt;/span&gt;,
key));&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 58: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 59: &lt;/span&gt; dictionaryItem.Save();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 60: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 61: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 62: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 63: &lt;/span&gt; &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 64: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 65: &lt;/span&gt; &lt;span class="rem"&gt;//Logic may never break on
this Listener&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 66: &lt;/span&gt; Log.Add(LogTypes.Error, -1, &lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(&lt;span class="str"&gt;&amp;quot;Error
in Dictionary listener when adding item to dictionary {0} &amp;quot;&lt;/span&gt;, ex.Message));&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 67: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 68: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 69: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 70: &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;




.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;h4&gt;Configure the TraceListener
&lt;/h4&gt;
&lt;p&gt;
When you want to use the TraceListener you have to configure it in the web.config.
Add the following section to your web.config file.
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;system.diagnostics&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;trace&lt;/span&gt; &lt;span class="attr"&gt;autoflush&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;indentsize&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;4&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;listeners&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;remove&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Default&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;AddDictionaryListener&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SoetemanSoftware.Tools.AddUnknownDictionaryItemsListener,AddUnknownDictionaryItemsListener&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;listeners&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;trace&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;system.diagnostics&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
Also modify the existing Trace element by adding the &lt;strong&gt;writeToDiagnosticsTrace=&amp;quot;true&amp;quot;&lt;/strong&gt;.
This will forward the ASP.NET trace messages to our AddUnknownDictionaryItemsListener.
Simply set this attribute to false if you don't want the items to be added automatically.
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;trace&lt;/span&gt; &lt;span class="attr"&gt;enabled&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;requestLimit&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;10&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;pageOutput&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;traceMode&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SortByTime&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;localOnly&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;writeToDiagnosticsTrace&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;h4&gt;View the output
&lt;/h4&gt;
&lt;p&gt;
When you configured the trace listener and hit the page again the missing dictionary
items are added to Umbraco.
&lt;/p&gt;
&lt;p&gt;
&lt;img height="142" alt="dictionary items" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Autoadddictionaryitemsanotherapprouch_EB82/dictionary%20items_9a585ac1-1043-48a2-a212-e45decd5713d.jpg" width="453" border="0" /&gt; 
&lt;/p&gt;
&lt;p&gt;
Refresh the page again and you will see the following output
&lt;/p&gt;
&lt;p&gt;
&lt;img height="480" alt="output" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Autoadddictionaryitemsanotherapprouch_EB82/output_80c7006f-fc9c-46bc-b4f2-d0d39e5c352a.jpg" width="619" border="0" /&gt; 
&lt;/p&gt;
&lt;p&gt;
Sometimes you will encounter caching issues. When you want to avoid that use the umbdebugshowtrace=true
querystring parameter which will prevent caching.
&lt;/p&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h4&gt;Download
&lt;/h4&gt;
&lt;p&gt;
You can download the &lt;a href="http://www.richardsoeteman.net/downloads/umbraco/AddUnknownDictionaryItemsListener.zip" target="_blank"&gt;DLL
here&lt;/a&gt;. You can also dowload the &lt;a href="http://www.richardsoeteman.net/downloads/umbraco/AddUnknownDictionaryItemsListener_source.zip" target="_blank"&gt;source
here&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=3d85a1f8-9d7d-4dea-a592-8b6d84eac613" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,3d85a1f8-9d7d-4dea-a592-8b6d84eac613.aspx</comments>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=9ac856e3-3d8e-4f18-b39b-f268defa744f</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,9ac856e3-3d8e-4f18-b39b-f268defa744f.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,9ac856e3-3d8e-4f18-b39b-f268defa744f.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=9ac856e3-3d8e-4f18-b39b-f268defa744f</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Exactly 1 year ago I've downloaded <a title="Umbraco" href="http://www.umbraco.org/" target="_blank">Umbraco</a> for
the very first time and loving it ever since. One package that I've created in September
last year was UmbImport. While that was a cool package I'm happy to announce that
today I've released a new beta version of UmbImport. The most requested feature was
the ability to import members. I'm happy to announce that this feature is implemented
now. Below you find  a screencast that demo's the member import.
</p>
        <p>
          <embed src="http://vimeo.com/moogaloop.swf?clip_id=3853997&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" width="400" height="300" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" />
          <br />
          <a href="http://vimeo.com/3853997">Import members using umbImport</a> from <a href="http://vimeo.com/user1486818">Richard
Soeteman</a> on <a href="http://vimeo.com">Vimeo</a>.
</p>
        <h3>More changes
</h3>
        <p>
While member import is the biggest thing, it's nice to know what's also changed since
the last version. I will be blogging about each feature/change the next coming weeks.
</p>
        <h3>
        </h3>
        <ul>
          <li>
            <strong>DataAdapters.</strong> The previous version of UmbImport only supported three
datasources (Sql Server, CSV and XML). With the new version you can plugin your own
datasource by creating a custom DataAdapter (in the free version this will be limited
to 1). 
</li>
          <li>
            <strong>Events during import.</strong> Events are added that you can handle in your
custom code that notify you when a record is imported. 
</li>
          <li>
            <strong>No more Dashboard control.</strong> UmbImport is moved from a dashboard control
to a tree in the menu. 
</li>
          <li>
            <strong>Better install experience. </strong>With Umbraco 4 it's easier to create a
package and modify config files etc via PackageActions. UmbImport uses default and
Custom package actions to improve the install experience. 
</li>
        </ul>
        <h3>What's next?
</h3>
        <p>
Within a few weeks I hope to get V1 released and have proper documentation that describe
the functionality. After that I will work on UmbImport PRO, which will contain a few
extra features such as save wizard steps, scheduled imports, automatic field mapping,
support for more than 1 custom DataAdapter and more... The PRO version of UmbImport
will not be free(prices are not available yet). 
</p>
        <p>
As always I hope that you like the package which you can <a title="Download umbImport" href="http://umbimport.soetemansoftware.nl/">download
here</a></p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=9ac856e3-3d8e-4f18-b39b-f268defa744f" />
      </body>
      <title>New Beta version of UmbImport</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,9ac856e3-3d8e-4f18-b39b-f268defa744f.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/03/25/NewBetaVersionOfUmbImport.aspx</link>
      <pubDate>Wed, 25 Mar 2009 21:17:38 GMT</pubDate>
      <description>&lt;p&gt;
Exactly 1 year ago I've downloaded &lt;a title="Umbraco" href="http://www.umbraco.org/" target="_blank"&gt;Umbraco&lt;/a&gt; for
the very first time and loving it ever since. One package that I've created in September
last year was UmbImport. While that was a cool package I'm happy to announce that
today I've released a new beta version of UmbImport. The most requested feature was
the ability to import members. I'm happy to announce that this feature is implemented
now. Below you find&amp;#160; a screencast that demo's the member import.
&lt;/p&gt;
&lt;p&gt;
&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=3853997&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" width="400" height="300" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" /&gt; 
&lt;br /&gt;
&lt;a href="http://vimeo.com/3853997"&gt;Import members using umbImport&lt;/a&gt; from &lt;a href="http://vimeo.com/user1486818"&gt;Richard
Soeteman&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.
&lt;/p&gt;
&lt;h3&gt;More changes
&lt;/h3&gt;
&lt;p&gt;
While member import is the biggest thing, it's nice to know what's also changed since
the last version. I will be blogging about each feature/change the next coming weeks.
&lt;/p&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DataAdapters.&lt;/strong&gt; The previous version of UmbImport only supported three
datasources (Sql Server, CSV and XML). With the new version you can plugin your own
datasource by creating a custom DataAdapter (in the free version this will be limited
to 1). 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Events during import.&lt;/strong&gt; Events are added that you can handle in your
custom code that notify you when a record is imported. 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No more Dashboard control.&lt;/strong&gt; UmbImport is moved from a dashboard control
to a tree in the menu. 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better install experience. &lt;/strong&gt;With Umbraco 4 it's easier to create a
package and modify config files etc via PackageActions. UmbImport uses default and
Custom package actions to improve the install experience. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;What's next?
&lt;/h3&gt;
&lt;p&gt;
Within a few weeks I hope to get V1 released and have proper documentation that describe
the functionality. After that I will work on UmbImport PRO, which will contain a few
extra features such as save wizard steps, scheduled imports, automatic field mapping,
support for more than 1 custom DataAdapter and more... The PRO version of UmbImport
will not be free(prices are not available yet). 
&lt;/p&gt;
&lt;p&gt;
As always I hope that you like the package which you can &lt;a title="Download umbImport" href="http://umbimport.soetemansoftware.nl/"&gt;download
here&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=9ac856e3-3d8e-4f18-b39b-f268defa744f" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,9ac856e3-3d8e-4f18-b39b-f268defa744f.aspx</comments>
      <category>UmbImport</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=90e0ca4a-0e98-4962-9d86-5381d57e6ae7</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,90e0ca4a-0e98-4962-9d86-5381d57e6ae7.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,90e0ca4a-0e98-4962-9d86-5381d57e6ae7.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=90e0ca4a-0e98-4962-9d86-5381d57e6ae7</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Currently I'm working on an Umbraco V4 site and had an issue when rendering the meta
tags.
</p>
        <h4>The problem:
</h4>
        <p>
In my template I've added the keywords and description tag in the head to render the
meta information for keywords and description. 
</p>
        <pre class="csharpcode">&lt;head runat="server"&gt;
&lt;meta name="keywords" content="&lt;umbraco:Item field=<span class="str">'metaKeywords'</span><span class="kwrd">recursive</span>=<span class="str">'true'</span> runat=<span class="str">'server'</span>&gt;&lt;/umbraco:Item&gt;"
/&gt; &lt;meta name="description" content="&lt;umbraco:Item field=<span class="str">'metaDescription'</span><span class="kwrd">recursive</span>=<span class="str">'true'</span> runat=<span class="str">'server'</span>&gt;&lt;/umbraco:Item&gt;"
/&gt; &lt;/head&gt;</pre>
        <p>
I've seen several examples that used the &lt;Umbraco:Item&gt; control with single
quotes to set the properties so I thought this should work. However when the output
was different then I would expect:
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">head</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">meta</span>
          <span class="attr">name</span>
          <span class="kwrd">="keywords"</span>
          <span class="attr">content</span>="&amp;<span class="attr">amp</span>;<span class="attr">lt</span>;<span class="attr">umbraco:Item</span><span class="attr">field</span><span class="kwrd">='metaKeywords'</span><span class="attr">recursive</span><span class="kwrd">='true'</span><span class="attr">runat</span><span class="kwrd">='server'</span><span class="kwrd">&gt;</span><span class="attr">&amp;lt;</span>/umbraco:Item<span class="kwrd">&gt;</span>" <span class="kwrd">/&gt;</span><span class="kwrd">&lt;</span><span class="html">meta</span><span class="attr">name</span><span class="kwrd">="description"</span><span class="attr">content</span>="&amp;<span class="attr">amp</span>;<span class="attr">lt</span>;<span class="attr">umbraco:Item</span><span class="attr">field</span><span class="kwrd">='metaDescription'</span><span class="attr">recursive</span><span class="kwrd">='true'</span><span class="attr">runat</span><span class="kwrd">='server'</span><span class="kwrd">&gt;</span><span class="attr">&amp;lt;</span>/umbraco:Item<span class="kwrd">&gt;</span>" <span class="kwrd">/&gt;</span><span class="kwrd">&lt;/</span><span class="html">head</span><span class="kwrd">&gt;</span></pre>
        <style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <h4>The Cause:
</h4>
        <p>
When I took a detailed look on this issue I saw that the head tag in my template had
a Runat="Server" attribute. When I removed this attribute the output was
rendered fine. I'm using a few Ajax Controls on forms that throws an error when it
can't find a Head tag with the Runat="Server" attribute, so simply removing
it isn't the solution.
</p>
        <h4>The solution,  Macro's to the rescue:
</h4>
        <p>
With a Macro and an XSLT file this issue can easily be solved and after thinking of
it it's also a better solution because it's a better separation between HTML and ASP.Net
code. To solve it you just create a Macro that excepts two parameters (keywords and
description). Then create an XSLT file that outputs the values like this example:
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;?</span>
          <span class="html">xml</span>
          <span class="attr">version</span>
          <span class="kwrd">="1.0"</span>
          <span class="attr">encoding</span>
          <span class="kwrd">="UTF-8"</span>?<span class="kwrd">&gt;</span><span class="kwrd">&lt;!</span><span class="html">DOCTYPE</span><span class="attr">xsl:stylesheet</span> [
&amp;<span class="attr">lt</span>;!<span class="attr">ENTITY</span><span class="attr">nbsp</span><span class="kwrd">"&amp;#x00A0;"</span><span class="kwrd">&gt;</span> ]<span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">xsl:stylesheet</span><span class="attr">version</span><span class="kwrd">="1.0"</span><span class="attr">xmlns:xsl</span><span class="kwrd">="http://www.w3.org/1999/XSL/Transform"</span><span class="attr">xmlns:msxml</span><span class="kwrd">="urn:schemas-microsoft-com:xslt"</span><span class="attr">xmlns:umbraco</span>.<span class="attr">library</span><span class="kwrd">="urn:umbraco.library"</span><span class="attr">exclude-result-prefixes</span><span class="kwrd">="msxml
umbraco.library"</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">xsl:output</span><span class="attr">method</span><span class="kwrd">="xml"</span><span class="attr">omit-xml-declaration</span><span class="kwrd">="yes"</span><span class="kwrd">/&gt;</span><span class="kwrd">&lt;</span><span class="html">xsl:param</span><span class="attr">name</span><span class="kwrd">="currentPage"</span><span class="kwrd">/&gt;</span><span class="kwrd">&lt;</span><span class="html">xsl:variable</span><span class="attr">name</span><span class="kwrd">="keywords"</span><span class="attr">select</span><span class="kwrd">="/macro/keywords"</span><span class="kwrd">/&gt;</span><span class="kwrd">&lt;</span><span class="html">xsl:variable</span><span class="attr">name</span><span class="kwrd">="description"</span><span class="attr">select</span><span class="kwrd">="/macro/description"</span><span class="kwrd">/&gt;</span><span class="kwrd">&lt;</span><span class="html">xsl:template</span><span class="attr">match</span><span class="kwrd">="/"</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">meta</span><span class="attr">name</span><span class="kwrd">="keywords"</span><span class="attr">content</span><span class="kwrd">="{$keywords}"</span><span class="kwrd">/&gt;</span><span class="kwrd">&lt;</span><span class="html">meta</span><span class="attr">name</span><span class="kwrd">="description"</span><span class="attr">content</span><span class="kwrd">="{$description}"</span><span class="kwrd">/&gt;</span><span class="kwrd">&lt;/</span><span class="html">xsl:template</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;/</span><span class="html">xsl:stylesheet</span><span class="kwrd">&gt;</span></pre>
        <style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
Then use the Macro in your template:
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">umbraco:Macro</span>
          <span class="attr">keywords</span>
          <span class="kwrd">="[$metaKeywords]"</span>
          <span class="attr">description</span>
          <span class="kwrd">="[$metaDescription]"</span>
          <span class="attr">Alias</span>
          <span class="kwrd">="MetaTags"</span>
          <span class="attr">runat</span>
          <span class="kwrd">="server"</span>
          <span class="kwrd">&gt;&lt;/</span>
          <span class="html">umbraco:Macro</span>
          <span class="kwrd">&gt;</span>
        </pre>
        <p>
Now you have exact the same functionality and it will work in any situation. Because
I'm using the $ sign before the fieldnames that are passed to the Umbraco. Umbraco
will do a recursive search for the values of those properties, just like the recursive
attribute does on the Umbraco:item tag.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=90e0ca4a-0e98-4962-9d86-5381d57e6ae7" />
      </body>
      <title>Meta tags, Umbraco:item control and runat=&amp;quot;server&amp;quot; magic</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,90e0ca4a-0e98-4962-9d86-5381d57e6ae7.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/03/17/MetaTagsUmbracoitemControlAndRunatquotserverquotMagic.aspx</link>
      <pubDate>Tue, 17 Mar 2009 09:04:43 GMT</pubDate>
      <description>&lt;p&gt;
Currently I'm working on an Umbraco V4 site and had an issue when rendering the meta
tags.
&lt;/p&gt;
&lt;h4&gt;The problem:
&lt;/h4&gt;
&lt;p&gt;
In my template I've added the keywords and description tag in the head to render the
meta information for keywords and description. 
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;
&amp;lt;meta name=&amp;quot;keywords&amp;quot; content=&amp;quot;&amp;lt;umbraco:Item field=&lt;span class="str"&gt;'metaKeywords'&lt;/span&gt; &lt;span class="kwrd"&gt;recursive&lt;/span&gt;=&lt;span class="str"&gt;'true'&lt;/span&gt; runat=&lt;span class="str"&gt;'server'&lt;/span&gt;&amp;gt;&amp;lt;/umbraco:Item&amp;gt;&amp;quot;
/&amp;gt; &amp;lt;meta name=&amp;quot;description&amp;quot; content=&amp;quot;&amp;lt;umbraco:Item field=&lt;span class="str"&gt;'metaDescription'&lt;/span&gt; &lt;span class="kwrd"&gt;recursive&lt;/span&gt;=&lt;span class="str"&gt;'true'&lt;/span&gt; runat=&lt;span class="str"&gt;'server'&lt;/span&gt;&amp;gt;&amp;lt;/umbraco:Item&amp;gt;&amp;quot;
/&amp;gt; &amp;lt;/head&amp;gt;&lt;/pre&gt;
&lt;p&gt;
I've seen several examples that used the &amp;lt;Umbraco:Item&amp;gt; control with single
quotes to set the properties so I thought this should work. However when the output
was different then I would expect:
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;meta&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;keywords&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;content&lt;/span&gt;=&amp;quot;&amp;amp;&lt;span class="attr"&gt;amp&lt;/span&gt;;&lt;span class="attr"&gt;lt&lt;/span&gt;;&lt;span class="attr"&gt;umbraco:Item&lt;/span&gt; &lt;span class="attr"&gt;field&lt;/span&gt;&lt;span class="kwrd"&gt;='metaKeywords'&lt;/span&gt; &lt;span class="attr"&gt;recursive&lt;/span&gt;&lt;span class="kwrd"&gt;='true'&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;='server'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;/umbraco:Item&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;meta&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;description&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;content&lt;/span&gt;=&amp;quot;&amp;amp;&lt;span class="attr"&gt;amp&lt;/span&gt;;&lt;span class="attr"&gt;lt&lt;/span&gt;;&lt;span class="attr"&gt;umbraco:Item&lt;/span&gt; &lt;span class="attr"&gt;field&lt;/span&gt;&lt;span class="kwrd"&gt;='metaDescription'&lt;/span&gt; &lt;span class="attr"&gt;recursive&lt;/span&gt;&lt;span class="kwrd"&gt;='true'&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;='server'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;/umbraco:Item&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;quot; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;h4&gt;The Cause:
&lt;/h4&gt;
&lt;p&gt;
When I took a detailed look on this issue I saw that the head tag in my template had
a Runat=&amp;quot;Server&amp;quot; attribute. When I removed this attribute the output was
rendered fine. I'm using a few Ajax Controls on forms that throws an error when it
can't find a Head tag with the Runat=&amp;quot;Server&amp;quot; attribute, so simply removing
it isn't the solution.
&lt;/p&gt;
&lt;h4&gt;The solution,&amp;#160; Macro's to the rescue:
&lt;/h4&gt;
&lt;p&gt;
With a Macro and an XSLT file this issue can easily be solved and after thinking of
it it's also a better solution because it's a better separation between HTML and ASP.Net
code. To solve it you just create a Macro that excepts two parameters (keywords and
description). Then create an XSLT file that outputs the values like this example:
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;UTF-8&amp;quot;&lt;/span&gt;?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="html"&gt;DOCTYPE&lt;/span&gt; &lt;span class="attr"&gt;xsl:stylesheet&lt;/span&gt; [
&amp;amp;&lt;span class="attr"&gt;lt&lt;/span&gt;;!&lt;span class="attr"&gt;ENTITY&lt;/span&gt; &lt;span class="attr"&gt;nbsp&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;quot;&amp;amp;#x00A0;&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; ]&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;xsl:stylesheet&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;xmlns:xsl&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://www.w3.org/1999/XSL/Transform&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;xmlns:msxml&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;urn:schemas-microsoft-com:xslt&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;xmlns:umbraco&lt;/span&gt;.&lt;span class="attr"&gt;library&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;urn:umbraco.library&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;exclude-result-prefixes&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;msxml
umbraco.library&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;xsl:output&lt;/span&gt; &lt;span class="attr"&gt;method&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;xml&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;omit-xml-declaration&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;yes&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;xsl:param&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;currentPage&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;xsl:variable&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;keywords&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;select&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;/macro/keywords&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;xsl:variable&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;description&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;select&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;/macro/description&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;xsl:template&lt;/span&gt; &lt;span class="attr"&gt;match&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;/&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;meta&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;keywords&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{$keywords}&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;meta&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;description&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{$description}&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;xsl:template&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;xsl:stylesheet&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
Then use the Macro in your template:
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;umbraco:Macro&lt;/span&gt; &lt;span class="attr"&gt;keywords&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;[$metaKeywords]&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;description&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;[$metaDescription]&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Alias&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;MetaTags&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;umbraco:Macro&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
Now you have exact the same functionality and it will work in any situation. Because
I'm using the $ sign before the fieldnames that are passed to the Umbraco. Umbraco
will do a recursive search for the values of those properties, just like the recursive
attribute does on the Umbraco:item tag.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=90e0ca4a-0e98-4962-9d86-5381d57e6ae7" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,90e0ca4a-0e98-4962-9d86-5381d57e6ae7.aspx</comments>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=f68469ce-f9b7-4354-913d-6c91d8cb318c</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,f68469ce-f9b7-4354-913d-6c91d8cb318c.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,f68469ce-f9b7-4354-913d-6c91d8cb318c.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f68469ce-f9b7-4354-913d-6c91d8cb318c</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Last week <a href="http://www.creativewebspecialist.co.uk/" target="_blank">Warren
Buckley</a> asked for a URL Rewrite Action to use in his awesome next version of the  <a href="http://umbracocws.codeplex.com/" target="_blank">Umbraco
Creative Website Starter site</a> (if Warren release it make sure you download it,
it's great!!). I was already thinking of creating some sort of packactions library
so I started working on that a little bit sooner (and more in a hurry) than expected.
The result is  a new <a href="http://www.codeplex.com/" target="_blank">Codeplex
project</a> called <a href="http://packageactioncontrib.codeplex.com/" target="_blank">Package
Actions Contrib</a> that will hopefully be used by the community and I'm also hoping
for a lot of contributors that will be part of this project.
</p>
        <h4>
        </h4>
        <h4>Package Actions?
</h4>
        <p>
Package actions are great to include some custom functionality during the install
of your package, just by implementing the IPackageAction interface and the use of
Package XML in the package creator. <a href="http://umbraco.tv/assets/package%20actions.pdf">This
PDF</a> describes all default package actions that are included in the V4 release
of umbraco and it also describes how to use them. 
</p>
        <h4>AddUrlRewriteRule Action
</h4>
        <p>
Currently only one package action is included in the project. That is the AddUrlRewriteRule
Action. With the AddUrlRewriteRule  you can add a new rewrite rule to the UrlRewriting.config
file. The xml snippet below descibes the xml for adding the UrlRewrite rule to the
config file. The action element is the normal element that you must include for each
package action. The Alias is the alias that is used in the AddUrlRewriteRule class.
The undo option is implemented but will not work because of <a href="http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=21426" target="_blank">this
bug</a> I recently found. And the add element is what you normally will add manually
in the UrlRewriting.config file. 
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">Action</span>
          <span class="attr">runat</span>
          <span class="kwrd">="install"</span>
          <span class="attr">undo</span>
          <span class="kwrd">="true"</span>
          <span class="attr">alias</span>
          <span class="kwrd">="AddUrlRewriteRule"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">add</span>
          <span class="attr">name</span>
          <span class="kwrd">="CWS_emaiAFriendID"</span>
          <span class="attr">virtualUrl</span>
          <span class="kwrd">="^~/email-a-friend/(.[0-9]*).aspx"</span>
          <span class="attr">rewriteUrlParameter</span>
          <span class="kwrd">="ExcludeFromClientQueryString"</span>
          <span class="attr">destinationUrl</span>
          <span class="kwrd">="~/email-a-friend.aspx?nodeID=$1"</span>
          <span class="attr">ignoreCase</span>
          <span class="kwrd">="true"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Action</span>
          <span class="kwrd">&gt;</span>
        </pre>
        <style type="text/css">


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <h4>
        </h4>
        <h6>
        </h6>
        <p>
What's next
</p>
        <p>
The next thing that will be added to the project is not a new action but it will be
a tool where you can test your package action and package action xml without actually
having to install a package. Instead you can upload the dll and enter the xml and
press the testbutton to validate that the action installed or uninstalled correctly
or what errors did occur. Also I like to have some documentation in the way that the
normal package actions are described.
</p>
        <h4>Contribute to the project
</h4>
        <p>
I think this project can only be a success with help from the community. So if you
have some really cool custom package action now that could be useful to share please
apply a patch on Codeplex or contact me by mail, also if you just have a great idea
that could be included in the project.
</p>
        <p>
          <a href="http://packageactioncontrib.codeplex.com/" target="_blank">Click here</a> to
visit the Codeplex project site. Hope to see some really nice package actions included
in the contrib.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=f68469ce-f9b7-4354-913d-6c91d8cb318c" />
      </body>
      <title>Package Actions Contrib</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,f68469ce-f9b7-4354-913d-6c91d8cb318c.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/03/03/PackageActionsContrib.aspx</link>
      <pubDate>Tue, 03 Mar 2009 12:39:34 GMT</pubDate>
      <description>&lt;p&gt;
Last week &lt;a href="http://www.creativewebspecialist.co.uk/" target="_blank"&gt;Warren
Buckley&lt;/a&gt; asked for a URL Rewrite Action to use in his awesome next version of the&amp;#160; &lt;a href="http://umbracocws.codeplex.com/" target="_blank"&gt;Umbraco
Creative Website Starter site&lt;/a&gt; (if Warren release it make sure you download it,
it's great!!). I was already thinking of creating some sort of packactions library
so I started working on that a little bit sooner (and more in a hurry) than expected.
The result is&amp;#160; a new &lt;a href="http://www.codeplex.com/" target="_blank"&gt;Codeplex
project&lt;/a&gt; called &lt;a href="http://packageactioncontrib.codeplex.com/" target="_blank"&gt;Package
Actions Contrib&lt;/a&gt; that will hopefully be used by the community and I'm also hoping
for a lot of contributors that will be part of this project.
&lt;/p&gt;
&lt;h4&gt;
&lt;/h4&gt;
&lt;h4&gt;Package Actions?
&lt;/h4&gt;
&lt;p&gt;
Package actions are great to include some custom functionality during the install
of your package, just by implementing the IPackageAction interface and the use of
Package XML in the package creator. &lt;a href="http://umbraco.tv/assets/package%20actions.pdf"&gt;This
PDF&lt;/a&gt; describes all default package actions that are included in the V4 release
of umbraco and it also describes how to use them. 
&lt;/p&gt;
&lt;h4&gt;AddUrlRewriteRule Action
&lt;/h4&gt;
&lt;p&gt;
Currently only one package action is included in the project. That is the AddUrlRewriteRule
Action. With the AddUrlRewriteRule&amp;#160; you can add a new rewrite rule to the UrlRewriting.config
file. The xml snippet below descibes the xml for adding the UrlRewrite rule to the
config file. The action element is the normal element that you must include for each
package action. The Alias is the alias that is used in the AddUrlRewriteRule class.
The undo option is implemented but will not work because of &lt;a href="http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=21426" target="_blank"&gt;this
bug&lt;/a&gt; I recently found. And the add element is what you normally will add manually
in the UrlRewriting.config file. 
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Action&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;install&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;undo&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;alias&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;AddUrlRewriteRule&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;CWS_emaiAFriendID&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;virtualUrl&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;^~/email-a-friend/(.[0-9]*).aspx&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;rewriteUrlParameter&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ExcludeFromClientQueryString&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;destinationUrl&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;~/email-a-friend.aspx?nodeID=$1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;ignoreCase&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Action&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;h4&gt;
&lt;/h4&gt;
&lt;h6&gt;
&lt;/h6&gt;
&lt;p&gt;
What's next
&lt;/p&gt;
&lt;p&gt;
The next thing that will be added to the project is not a new action but it will be
a tool where you can test your package action and package action xml without actually
having to install a package. Instead you can upload the dll and enter the xml and
press the testbutton to validate that the action installed or uninstalled correctly
or what errors did occur. Also I like to have some documentation in the way that the
normal package actions are described.
&lt;/p&gt;
&lt;h4&gt;Contribute to the project
&lt;/h4&gt;
&lt;p&gt;
I think this project can only be a success with help from the community. So if you
have some really cool custom package action now that could be useful to share please
apply a patch on Codeplex or contact me by mail, also if you just have a great idea
that could be included in the project.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://packageactioncontrib.codeplex.com/" target="_blank"&gt;Click here&lt;/a&gt; to
visit the Codeplex project site. Hope to see some really nice package actions included
in the contrib.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=f68469ce-f9b7-4354-913d-6c91d8cb318c" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,f68469ce-f9b7-4354-913d-6c91d8cb318c.aspx</comments>
      <category>Package</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=f470b6cf-40da-4aa9-a0d9-7b984fe9bf59</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,f470b6cf-40da-4aa9-a0d9-7b984fe9bf59.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,f470b6cf-40da-4aa9-a0d9-7b984fe9bf59.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f470b6cf-40da-4aa9-a0d9-7b984fe9bf59</wfw:commentRss>
      <slash:comments>6</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yesterday I gave a demo about events in <a title="Umbraco V4" href="http://www.umbraco.org/" target="_blank">Umbraco
V4</a>. I did this by describing a few "Business problems" that could be solved using
events. A few facts about events in Umbraco V4:
</p>
        <ul>
          <li>
You find events on every Component in Umbraco. 
</li>
          <li>
To uses events, you need references to the businesslogic, cms and interfaces assemlies. 
</li>
          <li>
To use events, you have to create a class that uses umbraco.BusinessLogic.ApplicationBase
as the base class.  In the constructor you can wire up the event handler. These
classes will be automaticly picked up when you put the file in the App_Code folder
of Umbraco or put the compiled DLL in the bin folder of Umbraco. I prefer the last
one. 
</li>
          <li>
Most of the event args derive from <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.canceleventargs.aspx" target="_blank">CancelEventArgs</a>,
so we can cancel the operation. 
</li>
          <li>
Because an event executes in the background you should always document that you're
using events and make sure you will write a logmessage when you're event handler gets
executed. 
</li>
        </ul>
        <p>
For my demo's, I've used an Umbraco V4 installation with the Creative Website Wizard
installed.
</p>
        <h4>Demo 1 Auto Expire news
</h4>
        <p>
In the first demo.I've showed how the document.BeforePublish can be used to check
if  a news item is allready expired, if so cancel the publish event, otherwise
check if the expire date is set and if not, set the expire date to 14 days from now.
</p>
        <div class="csharpcode">
          <pre>
            <span class="lnum"> 1: </span>
            <span class="kwrd">using</span> System;</pre>
          <pre>
            <span class="lnum"> 2: </span>
            <span class="kwrd">using</span> System.Collections.Generic;</pre>
          <pre>
            <span class="lnum"> 3: </span>
            <span class="kwrd">using</span> System.Text;</pre>
          <pre>
            <span class="lnum"> 4: </span>
            <span class="kwrd">using</span> umbraco.BusinessLogic;</pre>
          <pre>
            <span class="lnum"> 5: </span>
            <span class="kwrd">using</span> umbraco.cms.businesslogic.web;</pre>
          <pre>
            <span class="lnum"> 6: </span> </pre>
          <pre>
            <span class="lnum"> 7: </span>
            <span class="kwrd">namespace</span> AutoExpire</pre>
          <pre>
            <span class="lnum"> 8: </span>{</pre>
          <pre>
            <span class="lnum"> 9: </span>
            <span class="rem">///
&lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 10: </span>
            <span class="rem">/// </span>
          </pre>
          <pre>
            <span class="lnum"> 11: </span>
            <span class="rem">///
&lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 12: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">class</span> Expire
:ApplicationBase</pre>
          <pre>
            <span class="lnum"> 13: </span> {</pre>
          <pre>
            <span class="lnum"> 14: </span>
            <span class="rem">///
&lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 15: </span>
            <span class="rem">///
Constructor used to wire up the event</span>
          </pre>
          <pre>
            <span class="lnum"> 16: </span>
            <span class="rem">///
&lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 17: </span>
            <span class="kwrd">public</span> Expire()</pre>
          <pre>
            <span class="lnum"> 18: </span> {</pre>
          <pre>
            <span class="lnum"> 19: </span> Document.BeforePublish
+= <span class="kwrd">new</span> Document.PublishEventHandler(Document_BeforePublish);</pre>
          <pre>
            <span class="lnum"> 20: </span> }</pre>
          <pre>
            <span class="lnum"> 21: </span> </pre>
          <pre>
            <span class="lnum"> 22: </span>
            <span class="rem">///
&lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 23: </span>
            <span class="rem">///
Check if the news item is expired, or check if we need to set the expire date</span>
          </pre>
          <pre>
            <span class="lnum"> 24: </span>
            <span class="rem">///
&lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 25: </span>
            <span class="kwrd">void</span> Document_BeforePublish(Document
sender, umbraco.cms.businesslogic.PublishEventArgs e)</pre>
          <pre>
            <span class="lnum"> 26: </span> {</pre>
          <pre>
            <span class="lnum"> 27: </span>
            <span class="rem">//Always
LOG</span>
          </pre>
          <pre>
            <span class="lnum"> 28: </span> Log.Add(LogTypes.Custom, sender.Id, <span class="str">"Event
raised"</span>);</pre>
          <pre>
            <span class="lnum"> 29: </span>
            <span class="rem">//Check
if the doctype is news</span>
          </pre>
          <pre>
            <span class="lnum"> 30: </span>
            <span class="kwrd">if</span> (sender.ContentType.Alias
== <span class="str">"News"</span>)</pre>
          <pre>
            <span class="lnum"> 31: </span> {</pre>
          <pre>
            <span class="lnum"> 32: </span>
            <span class="rem">//Check
if the expiredate is filled and the value is not allready expired</span>
          </pre>
          <pre>
            <span class="lnum"> 33: </span>
            <span class="kwrd">if</span> (sender.ExpireDate
!= DateTime.MinValue &amp;&amp; sender.ExpireDate &lt; DateTime.Now)</pre>
          <pre>
            <span class="lnum"> 34: </span> {</pre>
          <pre>
            <span class="lnum"> 35: </span>
            <span class="rem">//Item
is expired, cancel the publish</span>
          </pre>
          <pre>
            <span class="lnum"> 36: </span> e.Cancel
= <span class="kwrd">true</span>;</pre>
          <pre>
            <span class="lnum"> 37: </span> }</pre>
          <pre>
            <span class="lnum"> 38: </span>
            <span class="kwrd">else</span>
          </pre>
          <pre>
            <span class="lnum"> 39: </span> {</pre>
          <pre>
            <span class="lnum"> 40: </span>
            <span class="rem">//Date
is not set set it now and save the doc. Probably better to to this in the before save
event</span>
          </pre>
          <pre>
            <span class="lnum"> 41: </span>
            <span class="rem">//since this
is a demo it's allowed to do it here</span>
          </pre>
          <pre>
            <span class="lnum"> 42: </span> sender.ExpireDate
= DateTime.Now.AddDays(14);</pre>
          <pre>
            <span class="lnum"> 43: </span> sender.Save();</pre>
          <pre>
            <span class="lnum"> 44: </span> </pre>
          <pre>
            <span class="lnum"> 45: </span> }</pre>
          <pre>
            <span class="lnum"> 46: </span> }</pre>
          <pre>
            <span class="lnum"> 47: </span> }</pre>
          <pre>
            <span class="lnum"> 48: </span> }</pre>
          <pre>
            <span class="lnum"> 49: </span>}</pre>
        </div>
        <style type="text/css">



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
During this demo someone asked if it's possible to show a custom message in the speechbubble
event when an event is canceled. This is not possible (tested it this morning), I've
created an <a href="http://www.codeplex.com/umbraco/WorkItem/View.aspx?WorkItemId=21309" target="_blank">item
on CodePlex</a>. 
</p>
        <h4>Demo 2 Auto archive news
</h4>
        <p>
In this Demo I've created some functionality to automaticly move a news item to the
archive folder when a content manager sets the archive boolean to true. First an archive
boolean must be added to the news document and a new Archive folder must be created
where we can store the archived News items in.
</p>
        <div class="csharpcode">
          <pre>
            <span class="lnum"> 1: </span>
            <span class="kwrd">using</span> umbraco.BusinessLogic;</pre>
          <pre>
            <span class="lnum"> 2: </span>
            <span class="kwrd">using</span> umbraco.cms.businesslogic.web;</pre>
          <pre>
            <span class="lnum"> 3: </span> </pre>
          <pre>
            <span class="lnum"> 4: </span>
            <span class="kwrd">namespace</span> AutoMoveToArchive</pre>
          <pre>
            <span class="lnum"> 5: </span>{</pre>
          <pre>
            <span class="lnum"> 6: </span>
            <span class="rem">///
&lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 7: </span>
            <span class="rem">///
Auto move demo</span>
          </pre>
          <pre>
            <span class="lnum"> 8: </span>
            <span class="rem">///
&lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 9: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">class</span> AutoMoveToArchive
: ApplicationBase</pre>
          <pre>
            <span class="lnum"> 10: </span> {</pre>
          <pre>
            <span class="lnum"> 11: </span>
            <span class="rem">///
&lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 12: </span>
            <span class="rem">///
Wire up the event handler</span>
          </pre>
          <pre>
            <span class="lnum"> 13: </span>
            <span class="rem">///
&lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 14: </span>
            <span class="kwrd">public</span> AutoMoveToArchive()</pre>
          <pre>
            <span class="lnum"> 15: </span> {</pre>
          <pre>
            <span class="lnum"> 16: </span> Document.BeforeSave
+= <span class="kwrd">new</span> Document.SaveEventHandler(Document_BeforeSave);</pre>
          <pre>
            <span class="lnum"> 17: </span> }</pre>
          <pre>
            <span class="lnum"> 18: </span> </pre>
          <pre>
            <span class="lnum"> 19: </span>
            <span class="rem">///
&lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 20: </span>
            <span class="rem">///
Before a documents get saved we wil check if the archived proerty is.</span>
          </pre>
          <pre>
            <span class="lnum"> 21: </span>
            <span class="rem">///
When it's set move it to the archive folder.</span>
          </pre>
          <pre>
            <span class="lnum"> 22: </span>
            <span class="rem">///
Again it;s demo code, normally you should also check if it's not allready IN the archived
foder ;-)</span>
          </pre>
          <pre>
            <span class="lnum"> 23: </span>
            <span class="rem">/// &lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 24: </span>
            <span class="kwrd">void</span> Document_BeforeSave(Document
sender, umbraco.cms.businesslogic.SaveEventArgs e)</pre>
          <pre>
            <span class="lnum"> 25: </span> {</pre>
          <pre>
            <span class="lnum"> 26: </span>
            <span class="rem">//
Set Arrchive folder id, no excuse to use hard coded values in Umbraco ;-)</span>
          </pre>
          <pre>
            <span class="lnum"> 27: </span>
            <span class="kwrd">int</span> archiveId
= 1123; </pre>
          <pre>
            <span class="lnum"> 28: </span>
            <span class="rem">//Log that we
are doing something</span>
          </pre>
          <pre>
            <span class="lnum"> 29: </span> Log.Add(LogTypes.Custom,
sender.Id, <span class="str">"Document After save Raised"</span>);</pre>
          <pre>
            <span class="lnum"> 30: </span> </pre>
          <pre>
            <span class="lnum"> 31: </span>
            <span class="rem">//Check
if the item is news and must be archived</span>
          </pre>
          <pre>
            <span class="lnum"> 32: </span>
            <span class="kwrd">if</span> (sender.ContentType.Alias
== <span class="str">"News"</span> &amp;&amp; sender.getProperty(<span class="str">"archived"</span>).Value.Equals(1))</pre>
          <pre>
            <span class="lnum"> 33: </span> {</pre>
          <pre>
            <span class="lnum"> 34: </span>
            <span class="rem">//Yes,
move to archive</span>
          </pre>
          <pre>
            <span class="lnum"> 35: </span> sender.Move(archiveId);</pre>
          <pre>
            <span class="lnum"> 36: </span> </pre>
          <pre>
            <span class="lnum"> 37: </span>
            <span class="rem">//Unpublish
from current Node</span>
          </pre>
          <pre>
            <span class="lnum"> 38: </span> umbraco.library.UnPublishSingleNode(sender.Id);</pre>
          <pre>
            <span class="lnum"> 39: </span> sender.UnPublish();</pre>
          <pre>
            <span class="lnum"> 40: </span>
            <span class="rem">//Publish
will get called if the user selected Save and publish</span>
          </pre>
          <pre>
            <span class="lnum"> 41: </span> }</pre>
          <pre>
            <span class="lnum"> 42: </span> }</pre>
          <pre>
            <span class="lnum"> 43: </span> }</pre>
          <pre>
            <span class="lnum"> 44: </span>}</pre>
        </div>
        <style type="text/css">



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <h4>Demo 3 Add Unpublish menu Item to the Context menu
</h4>
        <p>
In this demo I've showed that we can use events to modify the context menu. I'm missing
a unpublish item  in the context menu. This example is a little bit harder because
we we need to create a menu item also. A menu item can be created to create a class
that derives from the IAction interface. I will leave the explanation of this interface
for a future blogpost. 
</p>
        <div class="csharpcode">
          <pre>
            <span class="lnum"> 1: </span>
            <span class="kwrd">using</span> System;</pre>
          <pre>
            <span class="lnum"> 2: </span>
            <span class="kwrd">using</span> umbraco.BusinessLogic;</pre>
          <pre>
            <span class="lnum"> 3: </span>
            <span class="kwrd">using</span> umbraco.cms.presentation.Trees;</pre>
          <pre>
            <span class="lnum"> 4: </span>
            <span class="kwrd">using</span> umbraco.interfaces;</pre>
          <pre>
            <span class="lnum"> 5: </span> </pre>
          <pre>
            <span class="lnum"> 6: </span>
            <span class="kwrd">namespace</span> UnpublishAction</pre>
          <pre>
            <span class="lnum"> 7: </span>{</pre>
          <pre>
            <span class="lnum"> 8: </span>
            <span class="rem">///
&lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 9: </span>
            <span class="rem">///
Add unpublish to the menu item</span>
          </pre>
          <pre>
            <span class="lnum"> 10: </span>
            <span class="rem">///
&lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 11: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">class</span> AddUnpublishActionEvent
:ApplicationBase</pre>
          <pre>
            <span class="lnum"> 12: </span> {</pre>
          <pre>
            <span class="lnum"> 13: </span>
            <span class="kwrd">public</span> AddUnpublishActionEvent()</pre>
          <pre>
            <span class="lnum"> 14: </span> {</pre>
          <pre>
            <span class="lnum"> 15: </span> BaseContentTree.BeforeNodeRender
+= <span class="kwrd">new</span> BaseTree.BeforeNodeRenderEventHandler(BaseTree_BeforeNodeRender);</pre>
          <pre>
            <span class="lnum"> 16: </span> }</pre>
          <pre>
            <span class="lnum"> 17: </span> </pre>
          <pre>
            <span class="lnum"> 18: </span>
            <span class="rem">///
&lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 19: </span>
            <span class="rem">///
Before a menu item gets rendered we will add the unpublish action if the document
is published</span>
          </pre>
          <pre>
            <span class="lnum"> 20: </span>
            <span class="rem">///
&lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 21: </span>
            <span class="kwrd">private</span>
            <span class="kwrd">void</span> BaseTree_BeforeNodeRender(<span class="kwrd">ref</span> XmlTree
sender, <span class="kwrd">ref</span> XmlTreeNode node, EventArgs e)</pre>
          <pre>
            <span class="lnum"> 22: </span> {</pre>
          <pre>
            <span class="lnum"> 23: </span>
            <span class="rem">///Only
unpublish when published</span>
          </pre>
          <pre>
            <span class="lnum"> 24: </span>
            <span class="kwrd">if</span> (node.Menu!=
null &amp;&amp; !node.NotPublished.GetValueOrDefault(<span class="kwrd">true</span>))</pre>
          <pre>
            <span class="lnum"> 25: </span> {</pre>
          <pre>
            <span class="lnum"> 26: </span>
            <span class="rem">//Find
the publish action and add 1 for the index, so the position of the ubpublish is direct
after the publish menu item</span>
          </pre>
          <pre>
            <span class="lnum"> 27: </span>
            <span class="kwrd">int</span> index
= node.Menu.FindIndex(<span class="kwrd">delegate</span>(IAction a) { <span class="kwrd">return</span> a.Alias
== <span class="str">"publish"</span>; })+1;</pre>
          <pre>
            <span class="lnum"> 28: </span> </pre>
          <pre>
            <span class="lnum"> 29: </span>
            <span class="rem">//Insert
unpublish action</span>
          </pre>
          <pre>
            <span class="lnum"> 30: </span> node.Menu.Insert(index,
UnpublishAction.Instance);</pre>
          <pre>
            <span class="lnum"> 31: </span> }</pre>
          <pre>
            <span class="lnum"> 32: </span> }</pre>
          <pre>
            <span class="lnum"> 33: </span> }</pre>
          <pre>
            <span class="lnum"> 34: </span>}</pre>
        </div>
        <style type="text/css">



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
          <a href="http://www.richardsoeteman.net/downloads/Umbraco/unpublishmenuitem.zip" target="_blank">Download
the complete solution for this demo here</a>.
</p>
        <h4>Demo 4 Invisible for Writer Usertype
</h4>
        <p>
In the last demo I've showed how to use the AfterNodeRender event to make protected
nodes invisble for the Writer UserType
</p>
        <div class="csharpcode">
          <pre>
            <span class="lnum"> 1: </span>
            <span class="kwrd">using</span> System;</pre>
          <pre>
            <span class="lnum"> 2: </span>
            <span class="kwrd">using</span> umbraco.BusinessLogic;</pre>
          <pre>
            <span class="lnum"> 3: </span>
            <span class="kwrd">using</span> umbraco.cms.presentation.Trees;</pre>
          <pre>
            <span class="lnum"> 4: </span> </pre>
          <pre>
            <span class="lnum"> 5: </span>
            <span class="kwrd">namespace</span> OnlyForAdmins</pre>
          <pre>
            <span class="lnum"> 6: </span>{</pre>
          <pre>
            <span class="lnum"> 7: </span>
            <span class="rem">///
&lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 8: </span>
            <span class="rem">///
Makes a document invisible for writers</span>
          </pre>
          <pre>
            <span class="lnum"> 9: </span>
            <span class="rem">///
&lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 10: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">class</span> MenuIsNotForWriters
: ApplicationBase</pre>
          <pre>
            <span class="lnum"> 11: </span> {</pre>
          <pre>
            <span class="lnum"> 12: </span>
            <span class="rem">///
&lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 13: </span>
            <span class="rem">///
Wire up the event handler</span>
          </pre>
          <pre>
            <span class="lnum"> 14: </span>
            <span class="rem">///
&lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 15: </span>
            <span class="kwrd">public</span> MenuIsNotForWriters()</pre>
          <pre>
            <span class="lnum"> 16: </span> {</pre>
          <pre>
            <span class="lnum"> 17: </span> BaseContentTree.AfterNodeRender
+= <span class="kwrd">new</span> BaseTree.AfterNodeRenderEventHandler(BaseContentTree_AfterNodeRender);</pre>
          <pre>
            <span class="lnum"> 18: </span> }</pre>
          <pre>
            <span class="lnum"> 19: </span> </pre>
          <pre>
            <span class="lnum"> 20: </span>
            <span class="rem">///
&lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 21: </span>
            <span class="rem">///
Removes node from menu tree if page is protected and the user is a writer</span>
          </pre>
          <pre>
            <span class="lnum"> 22: </span>
            <span class="rem">///
&lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 23: </span>
            <span class="kwrd">void</span> BaseContentTree_AfterNodeRender(<span class="kwrd">ref</span> XmlTree
sender, <span class="kwrd">ref</span> XmlTreeNode node, EventArgs e)</pre>
          <pre>
            <span class="lnum"> 24: </span> {</pre>
          <pre>
            <span class="lnum"> 25: </span>
            <span class="rem">//check
if page is protecetd and the usertype is writer</span>
          </pre>
          <pre>
            <span class="lnum"> 26: </span>
            <span class="kwrd">if</span> (node.IsProtected.GetValueOrDefault(<span class="kwrd">false</span>)
&amp;&amp; umbraco.helper.GetCurrentUmbracoUser().UserType.Alias == <span class="str">"writer"</span>)</pre>
          <pre>
            <span class="lnum"> 27: </span> {</pre>
          <pre>
            <span class="lnum"> 28: </span>
            <span class="rem">//Writers
cannot see protected pages</span>
          </pre>
          <pre>
            <span class="lnum"> 29: </span> sender.Remove(node);</pre>
          <pre>
            <span class="lnum"> 30: </span> }</pre>
          <pre>
            <span class="lnum"> 31: </span> }</pre>
          <pre>
            <span class="lnum"> 32: </span> }</pre>
          <pre>
            <span class="lnum"> 33: </span>}</pre>
        </div>
        <style type="text/css">



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
          <span class="lnum">
          </span>
        </p>
        <h4>Overview of all Events
</h4>
        <table cellspacing="0" cellpadding="2" width="400" border="0">
          <tbody>
            <tr>
              <td valign="top" width="162">
                <strong>Class</strong>
              </td>
              <td valign="top" width="263">
                <strong>Events</strong>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
Access</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
BeforeAddProtection 
<br />
AfterAddProtection 
<br />
BeforeRemoveProtection 
<br />
AfterRemoveProtection 
<br />
BeforeAddMemberShipRoleToDocument AfterAddMemberShipRoleToDocument BeforeRemoveMemberShipRoleToDocument
AfterRemoveMemberShipRoleToDocument BeforeRemoveMembershipUserFromDocument AfterRemoveMembershipUserFromDocument
BeforeAddMembershipUserToDocument AfterAddMembershipUserToDocument
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
BaseTree</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeNodeRender 
<br />
AfterNodeRender
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
CMSNode</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
AfterNew 
<br />
BeforeDelete 
<br />
AfterDelete 
<br />
BeforeMove 
<br />
AfterMove
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
content</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeUpdateDocumentCache 
<br />
AfterUpdateDocumentCache 
<br />
BeforeClearDocumentCache 
<br />
AfterClearDocumentCache 
<br />
BeforeRefreshContent 
<br />
AfterRefreshContent
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
CreatedPackage</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeDelete 
<br />
AfterDelete 
<br />
BeforePublish 
<br />
AfterPublish 
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
DataType</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
Saving 
<br />
New 
<br />
Deleting
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
Dictionary</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
Saving 
<br />
New 
<br />
Deleting 
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
Document</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave  
<br />
AfterSave  
<br />
New  
<br />
BeforeDelete  
<br />
AfterDelete  
<br />
BeforePublish  
<br />
AfterPublish  
<br />
BeforeSendToPublish  
<br />
AfterSendToPublish  
<br />
BeforeUnPublish  
<br />
AfterUnPublish  
<br />
BeforeCopy  
<br />
AfterCopy  
<br />
BeforeRollBack  
<br />
AfterRollBack  
<br />
BeforeAddToIndex  
<br />
AfterAddToIndex
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
DocumentType</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeDelete 
<br />
AfterDelete 
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
Domain</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeDelete 
<br />
AfterDelete 
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
InstalledPackage</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeDelete 
<br />
AfterDelete 
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
Language</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeDelete 
<br />
AfterDelete
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
Macro</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeDelete 
<br />
AfterDelete
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
Media</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeDelete 
<br />
AfterDelete
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
MediaType</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeDelete 
<br />
AfterDelete 
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
Member</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeAddGroup 
<br />
AfterAddGroup 
<br />
BeforeRemoveGroup 
<br />
AfterRemoveGroup 
<br />
BeforeAddToCache 
<br />
AfterAddToCache 
<br />
BeforeDelete 
<br />
AfterDelete 
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
MemberGroup</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeDelete 
<br />
AfterDelete 
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
MemberType</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeDelete 
<br />
AfterDelete
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
StyleSheet</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeDelete 
<br />
AfterDelete 
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
StylesheetProperty</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeDelete 
<br />
AfterDelete 
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
Template</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeDelete 
<br />
AfterDelete 
</p>
              </td>
            </tr>
            <tr>
              <td valign="top" width="162">
User</td>
              <td valign="top" width="263">
 </td>
            </tr>
            <tr>
              <td valign="top" width="162">
 </td>
              <td valign="top" width="263">
                <p>
Saving 
<br />
New 
<br />
Disabling 
<br />
Deleting 
<br />
FlushingFromCache 
<br />
BeforeSave 
<br />
AfterSave 
<br />
New 
<br />
BeforeDelete 
<br />
AfterDelete 
<br />
BeforePublish 
<br />
AfterPublish
</p>
              </td>
            </tr>
          </tbody>
        </table>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=f470b6cf-40da-4aa9-a0d9-7b984fe9bf59" />
      </body>
      <title>Umbraco V4 events demo</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,f470b6cf-40da-4aa9-a0d9-7b984fe9bf59.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/02/22/UmbracoV4EventsDemo.aspx</link>
      <pubDate>Sun, 22 Feb 2009 10:38:11 GMT</pubDate>
      <description>&lt;p&gt;
Yesterday I gave a demo about events in &lt;a title="Umbraco V4" href="http://www.umbraco.org/" target=_blank&gt;Umbraco
V4&lt;/a&gt;. I did this by describing a few "Business problems" that could be solved using
events. A few facts about events in Umbraco V4:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
You find events on every Component in Umbraco. 
&lt;li&gt;
To uses events, you need references to the businesslogic, cms and interfaces assemlies. 
&lt;li&gt;
To use events, you have to create a class that uses umbraco.BusinessLogic.ApplicationBase
as the base class.&amp;nbsp; In the constructor you can wire up the event handler. These
classes will be automaticly picked up when you put the file in the App_Code folder
of Umbraco or put the compiled DLL in the bin folder of Umbraco. I prefer the last
one. 
&lt;li&gt;
Most of the event args derive from &lt;a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.canceleventargs.aspx" target=_blank&gt;CancelEventArgs&lt;/a&gt;,
so we can cancel the operation. 
&lt;li&gt;
Because an event executes in the background you should always document that you're
using events and make sure you will write a logmessage when you're event handler gets
executed. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
For my demo's, I've used an Umbraco V4 installation with the Creative Website Wizard
installed.
&lt;/p&gt;
&lt;h4&gt;Demo 1 Auto Expire news
&lt;/h4&gt;
&lt;p&gt;
In the first demo.I've showed how the document.BeforePublish can be used to check
if&amp;nbsp; a news item is allready expired, if so cancel the publish event, otherwise
check if the expire date is set and if not, set the expire date to 14 days from now.
&lt;/p&gt;
&lt;div class=csharpcode&gt;&lt;pre&gt;&lt;span class=lnum&gt; 1: &lt;/span&gt;&lt;span class=kwrd&gt;using&lt;/span&gt; System;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 2: &lt;/span&gt;&lt;span class=kwrd&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 3: &lt;/span&gt;&lt;span class=kwrd&gt;using&lt;/span&gt; System.Text;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 4: &lt;/span&gt;&lt;span class=kwrd&gt;using&lt;/span&gt; umbraco.BusinessLogic;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 5: &lt;/span&gt;&lt;span class=kwrd&gt;using&lt;/span&gt; umbraco.cms.businesslogic.web;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 6: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 7: &lt;/span&gt;&lt;span class=kwrd&gt;namespace&lt;/span&gt; AutoExpire&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 8: &lt;/span&gt;{&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 9: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 10: &lt;/span&gt; &lt;span class=rem&gt;/// &lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 11: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 12: &lt;/span&gt; &lt;span class=kwrd&gt;public&lt;/span&gt; &lt;span class=kwrd&gt;class&lt;/span&gt; Expire
:ApplicationBase&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 13: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 14: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 15: &lt;/span&gt; &lt;span class=rem&gt;///
Constructor used to wire up the event&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 16: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 17: &lt;/span&gt; &lt;span class=kwrd&gt;public&lt;/span&gt; Expire()&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 18: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 19: &lt;/span&gt; Document.BeforePublish
+= &lt;span class=kwrd&gt;new&lt;/span&gt; Document.PublishEventHandler(Document_BeforePublish);&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 20: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 21: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 22: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 23: &lt;/span&gt; &lt;span class=rem&gt;///
Check if the news item is expired, or check if we need to set the expire date&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 24: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 25: &lt;/span&gt; &lt;span class=kwrd&gt;void&lt;/span&gt; Document_BeforePublish(Document
sender, umbraco.cms.businesslogic.PublishEventArgs e)&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 26: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 27: &lt;/span&gt; &lt;span class=rem&gt;//Always
LOG&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 28: &lt;/span&gt; Log.Add(LogTypes.Custom, sender.Id, &lt;span class=str&gt;"Event
raised"&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 29: &lt;/span&gt; &lt;span class=rem&gt;//Check if
the doctype is news&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 30: &lt;/span&gt; &lt;span class=kwrd&gt;if&lt;/span&gt; (sender.ContentType.Alias
== &lt;span class=str&gt;"News"&lt;/span&gt;)&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 31: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 32: &lt;/span&gt; &lt;span class=rem&gt;//Check
if the expiredate is filled and the value is not allready expired&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 33: &lt;/span&gt; &lt;span class=kwrd&gt;if&lt;/span&gt; (sender.ExpireDate
!= DateTime.MinValue &amp;amp;&amp;amp; sender.ExpireDate &amp;lt; DateTime.Now)&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 34: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 35: &lt;/span&gt; &lt;span class=rem&gt;//Item
is expired, cancel the publish&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 36: &lt;/span&gt; e.Cancel
= &lt;span class=kwrd&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 37: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 38: &lt;/span&gt; &lt;span class=kwrd&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 39: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 40: &lt;/span&gt; &lt;span class=rem&gt;//Date
is not set set it now and save the doc. Probably better to to this in the before save
event&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 41: &lt;/span&gt; &lt;span class=rem&gt;//since this
is a demo it's allowed to do it here&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 42: &lt;/span&gt; sender.ExpireDate
= DateTime.Now.AddDays(14);&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 43: &lt;/span&gt; sender.Save();&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 44: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 45: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 46: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 47: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 48: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 49: &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type=text/css&gt;



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
During this demo someone asked if it's possible to show a custom message in the speechbubble
event when an event is canceled. This is not possible (tested it this morning), I've
created an &lt;a href="http://www.codeplex.com/umbraco/WorkItem/View.aspx?WorkItemId=21309" target=_blank&gt;item
on CodePlex&lt;/a&gt;. 
&lt;/p&gt;
&lt;h4&gt;Demo 2 Auto archive news
&lt;/h4&gt;
&lt;p&gt;
In this Demo I've created some functionality to automaticly move a news item to the
archive folder when a content manager sets the archive boolean to true. First an archive
boolean must be added to the news document and a new Archive folder must be created
where we can store the archived News items in.
&lt;/p&gt;
&lt;div class=csharpcode&gt;&lt;pre&gt;&lt;span class=lnum&gt; 1: &lt;/span&gt;&lt;span class=kwrd&gt;using&lt;/span&gt; umbraco.BusinessLogic;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 2: &lt;/span&gt;&lt;span class=kwrd&gt;using&lt;/span&gt; umbraco.cms.businesslogic.web;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 3: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 4: &lt;/span&gt;&lt;span class=kwrd&gt;namespace&lt;/span&gt; AutoMoveToArchive&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 5: &lt;/span&gt;{&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 6: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 7: &lt;/span&gt; &lt;span class=rem&gt;///
Auto move demo&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 8: &lt;/span&gt; &lt;span class=rem&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 9: &lt;/span&gt; &lt;span class=kwrd&gt;public&lt;/span&gt; &lt;span class=kwrd&gt;class&lt;/span&gt; AutoMoveToArchive
: ApplicationBase&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 10: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 11: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 12: &lt;/span&gt; &lt;span class=rem&gt;///
Wire up the event handler&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 13: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 14: &lt;/span&gt; &lt;span class=kwrd&gt;public&lt;/span&gt; AutoMoveToArchive()&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 15: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 16: &lt;/span&gt; Document.BeforeSave
+= &lt;span class=kwrd&gt;new&lt;/span&gt; Document.SaveEventHandler(Document_BeforeSave);&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 17: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 18: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 19: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 20: &lt;/span&gt; &lt;span class=rem&gt;///
Before a documents get saved we wil check if the archived proerty is.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 21: &lt;/span&gt; &lt;span class=rem&gt;///
When it's set move it to the archive folder.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 22: &lt;/span&gt; &lt;span class=rem&gt;///
Again it;s demo code, normally you should also check if it's not allready IN the archived
foder ;-)&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 23: &lt;/span&gt; &lt;span class=rem&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 24: &lt;/span&gt; &lt;span class=kwrd&gt;void&lt;/span&gt; Document_BeforeSave(Document
sender, umbraco.cms.businesslogic.SaveEventArgs e)&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 25: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 26: &lt;/span&gt; &lt;span class=rem&gt;//
Set Arrchive folder id, no excuse to use hard coded values in Umbraco ;-)&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 27: &lt;/span&gt; &lt;span class=kwrd&gt;int&lt;/span&gt; archiveId
= 1123; &lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 28: &lt;/span&gt; &lt;span class=rem&gt;//Log that we are
doing something&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 29: &lt;/span&gt; Log.Add(LogTypes.Custom,
sender.Id, &lt;span class=str&gt;"Document After save Raised"&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 30: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 31: &lt;/span&gt; &lt;span class=rem&gt;//Check
if the item is news and must be archived&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 32: &lt;/span&gt; &lt;span class=kwrd&gt;if&lt;/span&gt; (sender.ContentType.Alias
== &lt;span class=str&gt;"News"&lt;/span&gt; &amp;amp;&amp;amp; sender.getProperty(&lt;span class=str&gt;"archived"&lt;/span&gt;).Value.Equals(1))&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 33: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 34: &lt;/span&gt; &lt;span class=rem&gt;//Yes,
move to archive&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 35: &lt;/span&gt; sender.Move(archiveId);&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 36: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 37: &lt;/span&gt; &lt;span class=rem&gt;//Unpublish
from current Node&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 38: &lt;/span&gt; umbraco.library.UnPublishSingleNode(sender.Id);&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 39: &lt;/span&gt; sender.UnPublish();&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 40: &lt;/span&gt; &lt;span class=rem&gt;//Publish
will get called if the user selected Save and publish&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 41: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 42: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 43: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 44: &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type=text/css&gt;



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;h4&gt;Demo 3 Add Unpublish menu Item to the Context menu
&lt;/h4&gt;
&lt;p&gt;
In this demo I've showed that we can use events to modify the context menu. I'm missing
a unpublish item&amp;nbsp; in the context menu. This example is a little bit harder because
we we need to create a menu item also. A menu item can be created to create a class
that derives from the IAction interface. I will leave the explanation of this interface
for a future blogpost. 
&lt;/p&gt;
&lt;div class=csharpcode&gt;&lt;pre&gt;&lt;span class=lnum&gt; 1: &lt;/span&gt;&lt;span class=kwrd&gt;using&lt;/span&gt; System;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 2: &lt;/span&gt;&lt;span class=kwrd&gt;using&lt;/span&gt; umbraco.BusinessLogic;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 3: &lt;/span&gt;&lt;span class=kwrd&gt;using&lt;/span&gt; umbraco.cms.presentation.Trees;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 4: &lt;/span&gt;&lt;span class=kwrd&gt;using&lt;/span&gt; umbraco.interfaces;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 5: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 6: &lt;/span&gt;&lt;span class=kwrd&gt;namespace&lt;/span&gt; UnpublishAction&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 7: &lt;/span&gt;{&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 8: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 9: &lt;/span&gt; &lt;span class=rem&gt;///
Add unpublish to the menu item&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 10: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 11: &lt;/span&gt; &lt;span class=kwrd&gt;public&lt;/span&gt; &lt;span class=kwrd&gt;class&lt;/span&gt; AddUnpublishActionEvent
:ApplicationBase&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 12: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 13: &lt;/span&gt; &lt;span class=kwrd&gt;public&lt;/span&gt; AddUnpublishActionEvent()&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 14: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 15: &lt;/span&gt; BaseContentTree.BeforeNodeRender
+= &lt;span class=kwrd&gt;new&lt;/span&gt; BaseTree.BeforeNodeRenderEventHandler(BaseTree_BeforeNodeRender);&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 16: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 17: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 18: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 19: &lt;/span&gt; &lt;span class=rem&gt;///
Before a menu item gets rendered we will add the unpublish action if the document
is published&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 20: &lt;/span&gt; &lt;span class=rem&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 21: &lt;/span&gt; &lt;span class=kwrd&gt;private&lt;/span&gt; &lt;span class=kwrd&gt;void&lt;/span&gt; BaseTree_BeforeNodeRender(&lt;span class=kwrd&gt;ref&lt;/span&gt; XmlTree
sender, &lt;span class=kwrd&gt;ref&lt;/span&gt; XmlTreeNode node, EventArgs e)&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 22: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 23: &lt;/span&gt; &lt;span class=rem&gt;///Only
unpublish when published&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 24: &lt;/span&gt; &lt;span class=kwrd&gt;if&lt;/span&gt; (node.Menu!=
null &amp;amp;&amp;amp; !node.NotPublished.GetValueOrDefault(&lt;span class=kwrd&gt;true&lt;/span&gt;))&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 25: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 26: &lt;/span&gt; &lt;span class=rem&gt;//Find
the publish action and add 1 for the index, so the position of the ubpublish is direct
after the publish menu item&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 27: &lt;/span&gt; &lt;span class=kwrd&gt;int&lt;/span&gt; index
= node.Menu.FindIndex(&lt;span class=kwrd&gt;delegate&lt;/span&gt;(IAction a) { &lt;span class=kwrd&gt;return&lt;/span&gt; a.Alias
== &lt;span class=str&gt;"publish"&lt;/span&gt;; })+1;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 28: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 29: &lt;/span&gt; &lt;span class=rem&gt;//Insert
unpublish action&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 30: &lt;/span&gt; node.Menu.Insert(index,
UnpublishAction.Instance);&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 31: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 32: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 33: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 34: &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type=text/css&gt;



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/downloads/Umbraco/unpublishmenuitem.zip" target=_blank&gt;Download
the complete solution for this demo here&lt;/a&gt;.
&lt;/p&gt;
&lt;h4&gt;Demo 4 Invisible for Writer Usertype
&lt;/h4&gt;
&lt;p&gt;
In the last demo I've showed how to use the AfterNodeRender event to make protected
nodes invisble for the Writer UserType
&lt;/p&gt;
&lt;div class=csharpcode&gt;&lt;pre&gt;&lt;span class=lnum&gt; 1: &lt;/span&gt;&lt;span class=kwrd&gt;using&lt;/span&gt; System;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 2: &lt;/span&gt;&lt;span class=kwrd&gt;using&lt;/span&gt; umbraco.BusinessLogic;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 3: &lt;/span&gt;&lt;span class=kwrd&gt;using&lt;/span&gt; umbraco.cms.presentation.Trees;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 4: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 5: &lt;/span&gt;&lt;span class=kwrd&gt;namespace&lt;/span&gt; OnlyForAdmins&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 6: &lt;/span&gt;{&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 7: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 8: &lt;/span&gt; &lt;span class=rem&gt;///
Makes a document invisible for writers&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 9: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 10: &lt;/span&gt; &lt;span class=kwrd&gt;public&lt;/span&gt; &lt;span class=kwrd&gt;class&lt;/span&gt; MenuIsNotForWriters
: ApplicationBase&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 11: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 12: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 13: &lt;/span&gt; &lt;span class=rem&gt;///
Wire up the event handler&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 14: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 15: &lt;/span&gt; &lt;span class=kwrd&gt;public&lt;/span&gt; MenuIsNotForWriters()&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 16: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 17: &lt;/span&gt; BaseContentTree.AfterNodeRender
+= &lt;span class=kwrd&gt;new&lt;/span&gt; BaseTree.AfterNodeRenderEventHandler(BaseContentTree_AfterNodeRender);&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 18: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 19: &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 20: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 21: &lt;/span&gt; &lt;span class=rem&gt;///
Removes node from menu tree if page is protected and the user is a writer&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 22: &lt;/span&gt; &lt;span class=rem&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 23: &lt;/span&gt; &lt;span class=kwrd&gt;void&lt;/span&gt; BaseContentTree_AfterNodeRender(&lt;span class=kwrd&gt;ref&lt;/span&gt; XmlTree
sender, &lt;span class=kwrd&gt;ref&lt;/span&gt; XmlTreeNode node, EventArgs e)&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 24: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 25: &lt;/span&gt; &lt;span class=rem&gt;//check
if page is protecetd and the usertype is writer&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 26: &lt;/span&gt; &lt;span class=kwrd&gt;if&lt;/span&gt; (node.IsProtected.GetValueOrDefault(&lt;span class=kwrd&gt;false&lt;/span&gt;)
&amp;amp;&amp;amp; umbraco.helper.GetCurrentUmbracoUser().UserType.Alias == &lt;span class=str&gt;"writer"&lt;/span&gt;)&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 27: &lt;/span&gt; {&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 28: &lt;/span&gt; &lt;span class=rem&gt;//Writers
cannot see protected pages&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 29: &lt;/span&gt; sender.Remove(node);&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 30: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 31: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 32: &lt;/span&gt; }&lt;/pre&gt;&lt;pre&gt;&lt;span class=lnum&gt; 33: &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type=text/css&gt;



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
&lt;span class=lnum&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;h4&gt;Overview of all Events
&lt;/h4&gt;
&lt;table cellspacing=0 cellpadding=2 width=400 border=0&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&lt;strong&gt;Class&lt;/strong&gt;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;strong&gt;Events&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
Access&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
BeforeAddProtection 
&lt;br&gt;
AfterAddProtection 
&lt;br&gt;
BeforeRemoveProtection 
&lt;br&gt;
AfterRemoveProtection 
&lt;br&gt;
BeforeAddMemberShipRoleToDocument AfterAddMemberShipRoleToDocument BeforeRemoveMemberShipRoleToDocument
AfterRemoveMemberShipRoleToDocument BeforeRemoveMembershipUserFromDocument AfterRemoveMembershipUserFromDocument
BeforeAddMembershipUserToDocument AfterAddMembershipUserToDocument
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
BaseTree&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeNodeRender 
&lt;br&gt;
AfterNodeRender
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
CMSNode&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
AfterNew 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete 
&lt;br&gt;
BeforeMove 
&lt;br&gt;
AfterMove
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
content&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeUpdateDocumentCache 
&lt;br&gt;
AfterUpdateDocumentCache 
&lt;br&gt;
BeforeClearDocumentCache 
&lt;br&gt;
AfterClearDocumentCache 
&lt;br&gt;
BeforeRefreshContent 
&lt;br&gt;
AfterRefreshContent
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
CreatedPackage&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete 
&lt;br&gt;
BeforePublish 
&lt;br&gt;
AfterPublish 
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
DataType&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
Saving 
&lt;br&gt;
New 
&lt;br&gt;
Deleting
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
Dictionary&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
Saving 
&lt;br&gt;
New 
&lt;br&gt;
Deleting 
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
Document&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave&amp;nbsp; 
&lt;br&gt;
AfterSave&amp;nbsp; 
&lt;br&gt;
New&amp;nbsp; 
&lt;br&gt;
BeforeDelete&amp;nbsp; 
&lt;br&gt;
AfterDelete&amp;nbsp; 
&lt;br&gt;
BeforePublish&amp;nbsp; 
&lt;br&gt;
AfterPublish&amp;nbsp; 
&lt;br&gt;
BeforeSendToPublish&amp;nbsp; 
&lt;br&gt;
AfterSendToPublish&amp;nbsp; 
&lt;br&gt;
BeforeUnPublish&amp;nbsp; 
&lt;br&gt;
AfterUnPublish&amp;nbsp; 
&lt;br&gt;
BeforeCopy&amp;nbsp; 
&lt;br&gt;
AfterCopy&amp;nbsp; 
&lt;br&gt;
BeforeRollBack&amp;nbsp; 
&lt;br&gt;
AfterRollBack&amp;nbsp; 
&lt;br&gt;
BeforeAddToIndex&amp;nbsp; 
&lt;br&gt;
AfterAddToIndex
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
DocumentType&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete 
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
Domain&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete 
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
InstalledPackage&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete 
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
Language&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
Macro&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
Media&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
MediaType&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete 
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
Member&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeAddGroup 
&lt;br&gt;
AfterAddGroup 
&lt;br&gt;
BeforeRemoveGroup 
&lt;br&gt;
AfterRemoveGroup 
&lt;br&gt;
BeforeAddToCache 
&lt;br&gt;
AfterAddToCache 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete 
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
MemberGroup&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete 
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
MemberType&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
StyleSheet&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete 
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
StylesheetProperty&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete 
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
Template&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete 
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
User&lt;/td&gt;
&lt;td valign=top width=263&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign=top width=162&gt;
&amp;nbsp;&lt;/td&gt;
&lt;td valign=top width=263&gt;
&lt;p&gt;
Saving 
&lt;br&gt;
New 
&lt;br&gt;
Disabling 
&lt;br&gt;
Deleting 
&lt;br&gt;
FlushingFromCache 
&lt;br&gt;
BeforeSave 
&lt;br&gt;
AfterSave 
&lt;br&gt;
New 
&lt;br&gt;
BeforeDelete 
&lt;br&gt;
AfterDelete 
&lt;br&gt;
BeforePublish 
&lt;br&gt;
AfterPublish
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=f470b6cf-40da-4aa9-a0d9-7b984fe9bf59" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,f470b6cf-40da-4aa9-a0d9-7b984fe9bf59.aspx</comments>
      <category>ASP.NET</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=03a7169e-7710-4775-b9a4-435dc5c4da11</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,03a7169e-7710-4775-b9a4-435dc5c4da11.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,03a7169e-7710-4775-b9a4-435dc5c4da11.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=03a7169e-7710-4775-b9a4-435dc5c4da11</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
One of the things I like most about Umbraco is that you can extend it in a way that
your custom functionality has exactly the same behaviour as the standard Umbraco functionality.
The biggest compliment you can get from a user is when they say "I found a bug
in Umbraco" while it's your own control (or love the way Umbraco works when it's
your own control)..  One of the things to achieve that is to use the same mechanism
to show messages to the user as Umbraco does. In this post we create a simple user
control where the user can type a message and we will show that message using the
Umbraco Speech bubble mechanism as shown in the image below.
</p>
        <p>
 <img height="454" alt="speechbubble" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Keeptheuserinformed_11151/speechbubble_904082e1-c1d2-45b6-95f0-66192c399576.jpg" width="638" border="0" /></p>
        <p>
 
</p>
        <p>
To build this we need to create a standard WebUserControl called SpeechBubble.ascx.
In the ascx file we add the following code that creates the UI and hooks up an Event
Handler for the submit button.
</p>
        <pre class="csharpcode">
          <span class="asp">&lt;%@ Control Language="C#" AutoEventWireup="true"
CodeFile="SpeechBubble.ascx.cs" Inherits="SpeechBubble" %&gt;</span> Message:<span class="kwrd">&lt;</span><span class="html">asp:TextBox</span><span class="attr">ID</span><span class="kwrd">="MessageTextBox"</span><span class="attr">runat</span><span class="kwrd">="server"</span><span class="kwrd">&gt;&lt;/</span><span class="html">asp:TextBox</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">asp:Button</span><span class="attr">ID</span><span class="kwrd">="SpeechButton"</span><span class="attr">runat</span><span class="kwrd">="server"</span><span class="attr">onclick</span><span class="kwrd">="SpeechButton_Click"</span><span class="attr">Text</span><span class="kwrd">="Submit"</span><span class="kwrd">/&gt;</span></pre>
        <style type="text/css">



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
In the Code Behind file we will add the following code:
</p>
        <div class="csharpcode">
          <pre>
            <span class="lnum"> 1: </span>
            <span class="kwrd">using</span> System;</pre>
          <pre>
            <span class="lnum"> 2: </span>
            <span class="kwrd">using</span> umbraco.BasePages;</pre>
          <pre>
            <span class="lnum"> 3: </span> </pre>
          <pre>
            <span class="lnum"> 4: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">partial</span>
            <span class="kwrd">class</span> SpeechBubble
: System.Web.UI.UserControl</pre>
          <pre>
            <span class="lnum"> 5: </span>{</pre>
          <pre>
            <span class="lnum"> 6: </span>
            <span class="kwrd">protected</span>
            <span class="kwrd">void</span> SpeechButton_Click(<span class="kwrd">object</span> sender,
EventArgs e)</pre>
          <pre>
            <span class="lnum"> 7: </span> {</pre>
          <pre>
            <span class="lnum"> 8: </span>
            <span class="kwrd">if</span> (Page <span class="kwrd">is</span> BasePage)</pre>
          <pre>
            <span class="lnum"> 9: </span> {</pre>
          <pre>
            <span class="lnum"> 10: </span>
            <span class="rem">//Okay we are in Umbraco</span>
          </pre>
          <pre>
            <span class="lnum"> 11: </span> ((BasePage)Page).speechBubble(BasePage.speechBubbleIcon.info, <span class="str">"Message"</span>,
MessageTextBox.Text);</pre>
          <pre>
            <span class="lnum"> 12: </span> }</pre>
          <pre>
            <span class="lnum"> 13: </span> }</pre>
          <pre>
            <span class="lnum"> 14: </span>}</pre>
        </div>
        <style type="text/css">



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
We will run this code as an Dashboard Control which runs in the Umbraco context. Therefore
we can cast the Page Type to a the Umbraco BasePage type and then use the speechBubble
method which displays the message. If you want to play with this yourself, you can <a href="http://www.richardsoeteman.net/downloads/umbraco/SpeechBubble.zip" target="_blank">download
the usercontrol here</a>. Add the files in this zip file to the UserControl folder
of Umbraco  and Modifiy the Dashboard.Config file which you can find in the Config
folder:
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;?</span>
          <span class="html">xml</span>
          <span class="attr">version</span>
          <span class="kwrd">="1.0"</span>
          <span class="attr">encoding</span>
          <span class="kwrd">="utf-8"</span> ?<span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">dashBoard</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">section</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">areas</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">area</span><span class="kwrd">&gt;</span>developer<span class="kwrd">&lt;/</span><span class="html">area</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;/</span><span class="html">areas</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">tab</span><span class="attr">caption</span><span class="kwrd">="SpeechBubble"</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">control</span><span class="kwrd">&gt;</span>/usercontrols/SpeechBubble.ascx<span class="kwrd">&lt;/</span><span class="html">control</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;/</span><span class="html">tab</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;/</span><span class="html">section</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;/</span><span class="html">dashBoard</span><span class="kwrd">&gt;</span></pre>
        <p>
Then when you login to Umbraco and go to the developer section you can send messages
to yourself. Have fun.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=03a7169e-7710-4775-b9a4-435dc5c4da11" />
      </body>
      <title>Keep the user informed</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,03a7169e-7710-4775-b9a4-435dc5c4da11.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/02/05/KeepTheUserInformed.aspx</link>
      <pubDate>Thu, 05 Feb 2009 19:45:52 GMT</pubDate>
      <description>&lt;p&gt;
One of the things I like most about Umbraco is that you can extend it in a way that
your custom functionality has exactly the same behaviour as the standard Umbraco functionality.
The biggest compliment you can get from a user is when they say &amp;quot;I found a bug
in Umbraco&amp;quot; while it's your own control (or love the way Umbraco works when it's
your own control)..&amp;#160; One of the things to achieve that is to use the same mechanism
to show messages to the user as Umbraco does. In this post we create a simple user
control where the user can type a message and we will show that message using the
Umbraco Speech bubble mechanism as shown in the image below.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&lt;img height="454" alt="speechbubble" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Keeptheuserinformed_11151/speechbubble_904082e1-c1d2-45b6-95f0-66192c399576.jpg" width="638" border="0" /&gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
To build this we need to create a standard WebUserControl called SpeechBubble.ascx.
In the ascx file we add the following code that creates the UI and hooks up an Event
Handler for the submit button.
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%@ Control Language=&amp;quot;C#&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot;
CodeFile=&amp;quot;SpeechBubble.ascx.cs&amp;quot; Inherits=&amp;quot;SpeechBubble&amp;quot; %&amp;gt;&lt;/span&gt; Message:&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;MessageTextBox&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SpeechButton&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;onclick&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SpeechButton_Click&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Submit&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
In the Code Behind file we will add the following code:
&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 2: &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; umbraco.BasePages;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 3: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 4: &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; SpeechBubble
: System.Web.UI.UserControl&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 5: &lt;/span&gt;{&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 6: &lt;/span&gt; &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; SpeechButton_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender,
EventArgs e)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 7: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 8: &lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (Page &lt;span class="kwrd"&gt;is&lt;/span&gt; BasePage)&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 9: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 10: &lt;/span&gt; &lt;span class="rem"&gt;//Okay we are in Umbraco&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 11: &lt;/span&gt; ((BasePage)Page).speechBubble(BasePage.speechBubbleIcon.info, &lt;span class="str"&gt;&amp;quot;Message&amp;quot;&lt;/span&gt;,
MessageTextBox.Text);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 12: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 13: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 14: &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
We will run this code as an Dashboard Control which runs in the Umbraco context. Therefore
we can cast the Page Type to a the Umbraco BasePage type and then use the speechBubble
method which displays the message. If you want to play with this yourself, you can &lt;a href="http://www.richardsoeteman.net/downloads/umbraco/SpeechBubble.zip" target="_blank"&gt;download
the usercontrol here&lt;/a&gt;. Add the files in this zip file to the UserControl folder
of Umbraco&amp;#160; and Modifiy the Dashboard.Config file which you can find in the Config
folder:
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;utf-8&amp;quot;&lt;/span&gt; ?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;dashBoard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;section&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;areas&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;area&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;developer&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;area&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;areas&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tab&lt;/span&gt; &lt;span class="attr"&gt;caption&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SpeechBubble&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;control&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;/usercontrols/SpeechBubble.ascx&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;control&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tab&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;section&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;dashBoard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
Then when you login to Umbraco and go to the developer section you can send messages
to yourself. Have fun.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=03a7169e-7710-4775-b9a4-435dc5c4da11" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,03a7169e-7710-4775-b9a4-435dc5c4da11.aspx</comments>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=fa8fe2d1-a832-40a3-a48e-a761e005a307</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,fa8fe2d1-a832-40a3-a48e-a761e005a307.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,fa8fe2d1-a832-40a3-a48e-a761e005a307.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=fa8fe2d1-a832-40a3-a48e-a761e005a307</wfw:commentRss>
      <slash:comments>7</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Content Maintenance Dashboard is a simple package to bulk publish, unpublish and delete
content items based on name,state and document type. When you install it and go to
the developer section of Umbraco you can see the search screen like the image below.
From the search results screen you can perform actions on a single Item or you can
choose to perform the same action on all the items in the search result. 
</p>
        <p>
 <img height="403" alt="contentmaintenance" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/ContentMaintenanceDashboardPackage_EE9F/contentmaintenance_3.jpg" width="640" border="0" /></p>
        <p>
The package is using sql to search for the documents. I'm using the new datalayer
so it should be working on any type of database that is supported by Umbraco, however
I only tested the package on SQL Server. I have tested this package also on the Umbraco
RC3 release(this is probably the first package that is compiled against the RC3 Binaries).
You can <a title="download the package here" href="http://www.richardsoeteman.net/downloads/Umbraco/ContenMaintenance/Content_Maintenance_1.zip" target="_blank">download
the package here</a>, if you want the complete source code you can <a title="download it here" href="http://www.richardsoeteman.net/downloads/Umbraco/ContenMaintenance/Content_Maintenance_Source.zip" target="_blank">download
it here</a>.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=fa8fe2d1-a832-40a3-a48e-a761e005a307" />
      </body>
      <title>Content Maintenance Dashboard Package</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,fa8fe2d1-a832-40a3-a48e-a761e005a307.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/01/23/ContentMaintenanceDashboardPackage.aspx</link>
      <pubDate>Fri, 23 Jan 2009 16:19:45 GMT</pubDate>
      <description>&lt;p&gt;
Content Maintenance Dashboard is a simple package to bulk publish, unpublish and delete
content items based on name,state and document type. When you install it and go to
the developer section of Umbraco you can see the search screen like the image below.
From the search results screen you can perform actions on a single Item or you can
choose to perform the same action on all the items in the search result. 
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&lt;img height="403" alt="contentmaintenance" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/ContentMaintenanceDashboardPackage_EE9F/contentmaintenance_3.jpg" width="640" border="0" /&gt; 
&lt;/p&gt;
&lt;p&gt;
The package is using sql to search for the documents. I'm using the new datalayer
so it should be working on any type of database that is supported by Umbraco, however
I only tested the package on SQL Server. I have tested this package also on the Umbraco
RC3 release(this is probably the first package that is compiled against the RC3 Binaries).
You can &lt;a title="download the package here" href="http://www.richardsoeteman.net/downloads/Umbraco/ContenMaintenance/Content_Maintenance_1.zip" target="_blank"&gt;download
the package here&lt;/a&gt;, if you want the complete source code you can &lt;a title="download it here" href="http://www.richardsoeteman.net/downloads/Umbraco/ContenMaintenance/Content_Maintenance_Source.zip" target="_blank"&gt;download
it here&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=fa8fe2d1-a832-40a3-a48e-a761e005a307" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,fa8fe2d1-a832-40a3-a48e-a761e005a307.aspx</comments>
      <category>Package</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=ef254d48-41ed-41a9-9039-3622a5008457</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,ef254d48-41ed-41a9-9039-3622a5008457.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,ef254d48-41ed-41a9-9039-3622a5008457.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ef254d48-41ed-41a9-9039-3622a5008457</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Voor de echte Umbracoholics in de Benelux organiseert de Umbraco gebruikersgroep Benelux
op <strong>zaterdag 21 februari</strong> haar tweede gebruikersbijeenkomst in <strong>Amsterdam</strong>.
Het belooft weer een zeer informatieve dag te worden waar de nadruk uiteraard zal
liggen op <strong>Umbraco V4</strong>, waarvan de tweede release candidate
inmiddels uit is. In een informele sfeer zullen onder andere de volgende  onderwerpen
behandeld worden. 
</p>
        <p>
        </p>
        <ul>
          <li>
Umbraco een showcase.  
</li>
          <li>
Umbraco V4, een overzicht 
</li>
          <li>
Canvas (voorheen Live Editing) 
</li>
          <li>
DataLayer. 
</li>
          <li>
Event model. 
</li>
          <li>
Uitbreiden van Umbraco. 
</li>
        </ul>
        <p>
Uiteraard bestaat er ook de mogelijkheid je eigen implementaties, of ontwikkelde packages
te tonen. 
</p>
        <p>
De gebruikersdag wordt gehouden bij <strong>Mirabeau in Amsterdam</strong>. Mirabeau
is als full service internet bureau betrokken bij enkele grotere Umbraco
implementaties, waarvan er één als showcase gepresenteerd zal worden.  <a href="http://www.mirabeau.nl/contact-amsterdam.asp" target="_blank">Klik
hier</a> voor adres informatie en een routebeschrijving. 
</p>
        <p>
We zullen <strong>beginnen om 9:30</strong> en eindigen rond 16:00. De gebruikersdag
is <strong>gratis</strong>, het enige dat we vragen is je even <strong>in te
schrijven</strong><a href="http://inschrijven.soetemansoftware.nl/" target="_blank">via dit
formulier</a>. Doe dit snel, het aantal plaatsen is beperkt. 
</p>
        <p>
Tot zaterdag 21 februari.   
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=ef254d48-41ed-41a9-9039-3622a5008457" />
      </body>
      <title>Umbraco Benelux gebruikersdag</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,ef254d48-41ed-41a9-9039-3622a5008457.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/01/21/UmbracoBeneluxGebruikersdag.aspx</link>
      <pubDate>Wed, 21 Jan 2009 08:38:02 GMT</pubDate>
      <description>&lt;p&gt;
Voor de echte Umbracoholics in de Benelux organiseert de Umbraco gebruikersgroep Benelux
op &lt;strong&gt;zaterdag 21 februari&lt;/strong&gt; haar tweede gebruikersbijeenkomst in &lt;strong&gt;Amsterdam&lt;/strong&gt;.
Het belooft weer een zeer informatieve dag te worden waar de nadruk uiteraard zal
liggen op &lt;strong&gt;Umbraco V4&lt;/strong&gt;,&amp;nbsp;waarvan de&amp;nbsp;tweede release candidate
inmiddels uit&amp;nbsp;is. In een&amp;nbsp;informele sfeer zullen onder andere de volgende&amp;nbsp;&amp;nbsp;onderwerpen
behandeld worden. 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Umbraco een showcase.&amp;nbsp; 
&lt;li&gt;
Umbraco V4, een&amp;nbsp;overzicht 
&lt;li&gt;
Canvas (voorheen Live Editing) 
&lt;li&gt;
DataLayer. 
&lt;li&gt;
Event model. 
&lt;li&gt;
Uitbreiden van Umbraco. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Uiteraard bestaat er ook de mogelijkheid je eigen implementaties, of ontwikkelde packages
te tonen. 
&lt;/p&gt;
&lt;p&gt;
De gebruikersdag wordt gehouden bij &lt;strong&gt;Mirabeau in Amsterdam&lt;/strong&gt;.&amp;nbsp;Mirabeau
is als&amp;nbsp;full service&amp;nbsp;internet bureau betrokken bij enkele grotere Umbraco
implementaties, waarvan er&amp;nbsp;één als showcase gepresenteerd zal worden.&amp;nbsp;&amp;nbsp;&lt;a href="http://www.mirabeau.nl/contact-amsterdam.asp" target=_blank&gt;Klik
hier&lt;/a&gt; voor adres informatie en een routebeschrijving. 
&lt;/p&gt;
&lt;p&gt;
We zullen &lt;strong&gt;beginnen om 9:30&lt;/strong&gt; en eindigen rond 16:00. De gebruikersdag
is &lt;strong&gt;gratis&lt;/strong&gt;, het enige dat we vragen is&amp;nbsp;je even &lt;strong&gt;in te
schrijven&lt;/strong&gt; &lt;a href="http://inschrijven.soetemansoftware.nl/" target="_blank"&gt;via&amp;nbsp;dit
formulier&lt;/a&gt;. Doe dit snel, het aantal plaatsen is beperkt. 
&lt;/p&gt;
&lt;p&gt;
Tot zaterdag 21 februari.&amp;nbsp;&amp;nbsp; 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=ef254d48-41ed-41a9-9039-3622a5008457" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,ef254d48-41ed-41a9-9039-3622a5008457.aspx</comments>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=189035af-bbc0-4d3f-8d54-9782c06794e7</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,189035af-bbc0-4d3f-8d54-9782c06794e7.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,189035af-bbc0-4d3f-8d54-9782c06794e7.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=189035af-bbc0-4d3f-8d54-9782c06794e7</wfw:commentRss>
      <slash:comments>7</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Last September I've created a package called UmbImport which is capable of importing
content  from various datasources into <a title="Umbraco" href="http://www.umbraco.org/" target="_blank">Umbraco</a>.
For a demo of this package please checkout the video below.
</p>
        <p>
        </p>
        <object width="400" height="300">
          <param name="allowfullscreen" value="true" />
          <param name="allowscriptaccess" value="always" />
          <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6313565&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" />
          <embed src="http://vimeo.com/moogaloop.swf?clip_id=6313565&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300">
          </embed>
        </object>
        <p>
          <a href="http://vimeo.com/6313565">UmbImport</a> from <a href="http://vimeo.com/user1486818">Richard
Soeteman</a> on <a href="http://vimeo.com">Vimeo</a>.
</p>
        <p>
        </p>
        <p>
The package was based on Beta1 of Umbraco 4 and threw errors when installing on Umbraco
4 RC.  I've fixed these bugs and created a new package. Currently I'm also working
on a new version that is capable of importing members and I will add support for plugging
in your own datasource, so you can import data from any datasource you like. 
</p>
        <p>
          <a title="umbImport" href="http://www.soetemansoftware.nl/downloads/umbraco/packages/umbimport_0.1.zip" target="_blank">Download
umbImport here</a>
        </p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=189035af-bbc0-4d3f-8d54-9782c06794e7" />
      </body>
      <title>UmbImport Package updated for Umbraco 4 RC</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,189035af-bbc0-4d3f-8d54-9782c06794e7.aspx</guid>
      <link>http://www.richardsoeteman.net/2009/01/08/UmbImportPackageUpdatedForUmbraco4RC.aspx</link>
      <pubDate>Thu, 08 Jan 2009 21:41:44 GMT</pubDate>
      <description>&lt;p&gt;
Last September I've created a package called UmbImport which is capable of importing
content&amp;nbsp; from various datasources into &lt;a title=Umbraco href="http://www.umbraco.org/" target=_blank&gt;Umbraco&lt;/a&gt;.
For a demo of this package please checkout the video below.
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;object width="400" height="300"&gt;
&lt;param name="allowfullscreen" value="true" /&gt;
&lt;param name="allowscriptaccess" value="always" /&gt;
&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6313565&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=6313565&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;p&gt;
&lt;a href="http://vimeo.com/6313565"&gt;UmbImport&lt;/a&gt; from &lt;a href="http://vimeo.com/user1486818"&gt;Richard
Soeteman&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
The package was based on Beta1 of Umbraco 4 and threw errors when installing on Umbraco
4 RC.&amp;nbsp; I've fixed these bugs and created a new package. Currently I'm also working
on a new version that is capable of importing members and I will add support for plugging
in your own datasource, so you can import data from any datasource you like. 
&lt;/p&gt;
&lt;p&gt;
&lt;a title=umbImport href="http://www.soetemansoftware.nl/downloads/umbraco/packages/umbimport_0.1.zip" target=_blank&gt;Download
umbImport here&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=189035af-bbc0-4d3f-8d54-9782c06794e7" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,189035af-bbc0-4d3f-8d54-9782c06794e7.aspx</comments>
      <category>Tools</category>
      <category>Umbraco</category>
    </item>
  </channel>
</rss>