<?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>Thu, 14 Feb 2013 10:29:23 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=b168215f-975a-45d0-a8c6-f4c83a1b6f07</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,b168215f-975a-45d0-a8c6-f4c83a1b6f07.aspx</pingback:target>
      <dc:creator>Your DisplayName here!</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,b168215f-975a-45d0-a8c6-f4c83a1b6f07.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=b168215f-975a-45d0-a8c6-f4c83a1b6f07</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
It took a few months of development but I’m glad to finally announce SEO checker V1!
If you haven’t done already you can <a href="http://www.richardsoeteman.net/CategoryView,category,SEOChecker.aspx" target="_blank">read
previous blogposts about this package</a> or watch the <a href="https://vimeo.com/tag:seochecker" target="_blank">screencasts
about SEO checker</a>. I think it’s a package every site should have installed, when
building sites for clients. I have followed the #umbraco tag on twitter for more than
a year and have seen most sites that are released contain SEO issues.  When those
sites had SEO Checker installed it would have warned you before putting the site live.
So I hope you will at least <a href="http://soetemansoftware.nl/seochecker" target="_blank">download
SEO checker</a> and check you sites on localhost before putting it live. 
</p>
        <h3>Using SEO Checker for content editors
</h3>
        <p>
        </p>
        <p>
There is one big feature <a href="http://www.richardsoeteman.net/CategoryView,category,SEOChecker.aspx" target="_blank">the
previous blogposts</a> didn’t cover and that is using SEO Checker for content editors.SEO
Checker comes with a Data Type that can be added to document types. The SEO Checker
Data Type will show a Snippet preview how the page will be shown  in the Google
search results. If you are using a relevant  Title and Meta Description Google
will use these in the search results. Therefore these elements are important.
</p>
        <p>
          <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="seochecker-contenteditor" alt="seochecker-contenteditor" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1released_926D/seochecker-contenteditor_3.png" border="0" height="374" width="640" />
          <br />
It’s possible to specify a focus keyword, this is the keyword you want to rank the
page for, use the Keyword tool icon to get help selecting the keywords you want to
rank the page for.  SEO Checker will validate if the keyword can be found in
the most important elements of the page:
</p>
        <ul>
          <li>
Page Title (H1) 
</li>
          <li>
Url 
</li>
          <li>
SEO Title (&lt;title&gt;) 
</li>
          <li>
SEO  Description (&lt;meta name="description"…..) 
</li>
          <li>
At least once more in the text of the page 
</li>
        </ul>
        <p>
You can also specify the SEO Title, SEO Description and SEO keywords (when configured).
The page will also be checked for other SEO Issues on the page.  See the documentation
for a list of all validations. 
<br /><strong>The unpublished version of the page will be checked, this allows you to solve
issues before publishing the page!</strong></p>
        <h3>Configuration of the Data type
</h3>
        <p>
By default the SEO Checker data type will show a field for SEO title and description.
If you already have those properties on your document type you can use configuration
of the document type to map those . 
</p>
        <p>
          <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1released_926D/image_3.png" border="0" height="381" width="605" />
        </p>
        <p>
1.    Map SEO title against the existing SEO title property 
<br />
2.    Map SEO keywords against the existing SEO keywords property 
<br />
3.    Map SEO description against the existing SEO description property 
<br />
4.    Use the keywords meta tag (Google and all major search engines
ignore this meta tag).
</p>
        <h3>Document type meta data configuration
</h3>
        <p>
Using default SEO Properties you can specify default values  for SEO Title and
SEO description. When the page is missing the SEO title or description info these
mapped properties will be used.  The title will be copied. The description will
take the first paragraph from the mapped property. This ensures you always have you
meta tags filled. The validation process will validate if the tags are matching length
criteria.
</p>
        <h5>Title template
</h5>
        <p>
It’s also possible to specify a template for the SEO Title. This template will be
used to render the &lt;title&gt; tag in snippet preview and on the page.The template
can contain fixed text and placeholders, placeholders have the same syntax as you
would use in Umbraco Macro’s:
</p>
        <ul>
          <li>
[#Property alias ] will get the property from the current document 
</li>
          <li>
[$property alias] recursive look up the property 
</li>
        </ul>
        <p>
The following fixed properties can be used in the template:
</p>
        <ul>
          <li>
@nodeName contains the name of the page 
</li>
          <li>
@seoTitle contains the value of the SEO title property 
</li>
        </ul>
        <p>
When using the above template configuration the &lt;title&gt; tag will be rendered
as:
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">title</span>
          <span class="kwrd">&gt;</span>Simple
website | Simple website &amp;#169; 2013<span class="kwrd">&lt;/</span><span class="html">title</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>
        <h3>Use Metadata inside your template
</h3>
        <p>
SEO Checker comes with a small library to render Meta Tags in HTML. This is only necessary
when you use the SEO Checker data type. You can use the library in Razor, XSLT and
usercontrol macro’s. The library can be used in both MVC and Masterpage mode. To render
the metatags for the current page in razor simply use:
</p>
        <p>
This will render all metatags for the page like this:
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">title</span>
          <span class="kwrd">&gt;</span>Using
Modules | SEO Checker<span class="kwrd">&lt;/</span><span class="html">title</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">="Umbraco
modules encapsulate specific bits of advanced functionality that are easily added
to your website."</span><span class="kwrd">/&gt;</span><span class="kwrd">&lt;</span><span class="html">meta</span><span class="attr">name</span><span class="kwrd">="robots"</span><span class="attr">content</span><span class="kwrd">="index,
follow"</span><span class="kwrd">/&gt;</span><span class="kwrd">&lt;</span><span class="html">meta</span><span class="attr">http-equiv</span><span class="kwrd">="Content-Type"</span><span class="attr">content</span><span class="kwrd">="text/html;
charset=utf-8"</span><span class="kwrd">/&gt;</span></pre>
        <h3>Download V1 Trial
</h3>
        <p>
        </p>
        <p>
What are you waiting for. <a href="http://soetemansoftware.nl/seochecker" target="_blank">download
SEO Checker</a> and have a play on your local machine!
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=b168215f-975a-45d0-a8c6-f4c83a1b6f07" />
      </body>
      <title>SEO Checker V1 released!</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,b168215f-975a-45d0-a8c6-f4c83a1b6f07.aspx</guid>
      <link>http://www.richardsoeteman.net/2013/02/14/SEOCheckerV1Released.aspx</link>
      <pubDate>Thu, 14 Feb 2013 10:29:23 GMT</pubDate>
      <description>&lt;p&gt;
It took a few months of development but I’m glad to finally announce SEO checker V1!
If you haven’t done already you can &lt;a href="http://www.richardsoeteman.net/CategoryView,category,SEOChecker.aspx" target="_blank"&gt;read
previous blogposts about this package&lt;/a&gt; or watch the &lt;a href="https://vimeo.com/tag:seochecker" target="_blank"&gt;screencasts
about SEO checker&lt;/a&gt;. I think it’s a package every site should have installed, when
building sites for clients. I have followed the #umbraco tag on twitter for more than
a year and have seen most sites that are released contain SEO issues.&amp;nbsp; When those
sites had SEO Checker installed it would have warned you before putting the site live.
So I hope you will at least &lt;a href="http://soetemansoftware.nl/seochecker" target="_blank"&gt;download
SEO checker&lt;/a&gt; and check you sites on localhost before putting it live. 
&lt;/p&gt;
&lt;h3&gt;Using SEO Checker for content editors
&lt;/h3&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
There is one big feature &lt;a href="http://www.richardsoeteman.net/CategoryView,category,SEOChecker.aspx" target="_blank"&gt;the
previous blogposts&lt;/a&gt; didn’t cover and that is using SEO Checker for content editors.SEO
Checker comes with a Data Type that can be added to document types. The SEO Checker
Data Type will show a Snippet preview how the page will be shown&amp;nbsp; in the Google
search results. If you are using a relevant&amp;nbsp; Title and Meta Description Google
will use these in the search results. Therefore these elements are important.
&lt;/p&gt;
&lt;p&gt;
&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="seochecker-contenteditor" alt="seochecker-contenteditor" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1released_926D/seochecker-contenteditor_3.png" border="0" height="374" width="640"&gt; 
&lt;br&gt;
It’s possible to specify a focus keyword, this is the keyword you want to rank the
page for, use the Keyword tool icon to get help selecting the keywords you want to
rank the page for.&amp;nbsp; SEO Checker will validate if the keyword can be found in
the most important elements of the page:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Page Title (H1) 
&lt;/li&gt;
&lt;li&gt;
Url 
&lt;/li&gt;
&lt;li&gt;
SEO Title (&amp;lt;title&amp;gt;) 
&lt;/li&gt;
&lt;li&gt;
SEO&amp;nbsp; Description (&amp;lt;meta name="description"…..) 
&lt;/li&gt;
&lt;li&gt;
At least once more in the text of the page 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
You can also specify the SEO Title, SEO Description and SEO keywords (when configured).
The page will also be checked for other SEO Issues on the page.&amp;nbsp; See the documentation
for a list of all validations. 
&lt;br&gt;
&lt;strong&gt;The unpublished version of the page will be checked, this allows you to solve
issues before publishing the page!&lt;/strong&gt;
&lt;/p&gt;
&lt;h3&gt;Configuration of the Data type
&lt;/h3&gt;
&lt;p&gt;
By default the SEO Checker data type will show a field for SEO title and description.
If you already have those properties on your document type you can use configuration
of the document type to map those . 
&lt;/p&gt;
&lt;p&gt;
&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1released_926D/image_3.png" border="0" height="381" width="605"&gt; 
&lt;/p&gt;
&lt;p&gt;
1.&amp;nbsp;&amp;nbsp;&amp;nbsp; Map SEO title against the existing SEO title property 
&lt;br&gt;
2.&amp;nbsp;&amp;nbsp;&amp;nbsp; Map SEO keywords against the existing SEO keywords property 
&lt;br&gt;
3.&amp;nbsp;&amp;nbsp;&amp;nbsp; Map SEO description against the existing SEO description property 
&lt;br&gt;
4.&amp;nbsp;&amp;nbsp;&amp;nbsp; Use the keywords meta tag (Google and all major search engines
ignore this meta tag).
&lt;/p&gt;
&lt;h3&gt;Document type meta data configuration
&lt;/h3&gt;
&lt;p&gt;
Using default SEO Properties you can specify default values&amp;nbsp; for SEO Title and
SEO description. When the page is missing the SEO title or description info these
mapped properties will be used.&amp;nbsp; The title will be copied. The description will
take the first paragraph from the mapped property. This ensures you always have you
meta tags filled. The validation process will validate if the tags are matching length
criteria.
&lt;/p&gt;
&lt;h5&gt;Title template
&lt;/h5&gt;
&lt;p&gt;
It’s also possible to specify a template for the SEO Title. This template will be
used to render the &amp;lt;title&amp;gt; tag in snippet preview and on the page.The template
can contain fixed text and placeholders, placeholders have the same syntax as you
would use in Umbraco Macro’s:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
[#Property alias ] will get the property from the current document 
&lt;/li&gt;
&lt;li&gt;
[$property alias] recursive look up the property 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The following fixed properties can be used in the template:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
@nodeName contains the name of the page 
&lt;/li&gt;
&lt;li&gt;
@seoTitle contains the value of the SEO title property 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
When using the above template configuration the &amp;lt;title&amp;gt; tag will be rendered
as:
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Simple
website | Simple website &amp;amp;#169; 2013&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&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;h3&gt;Use Metadata inside your template
&lt;/h3&gt;
&lt;p&gt;
SEO Checker comes with a small library to render Meta Tags in HTML. This is only necessary
when you use the SEO Checker data type. You can use the library in Razor, XSLT and
usercontrol macro’s. The library can be used in both MVC and Masterpage mode. To render
the metatags for the current page in razor simply use:
&lt;/p&gt;
&lt;p&gt;
This will render all metatags for the page like this:
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Using
Modules | SEO Checker&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&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;="description"&lt;/span&gt; &lt;span class="attr"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;="Umbraco
modules encapsulate specific bits of advanced functionality that are easily added
to your website."&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;="robots"&lt;/span&gt; &lt;span class="attr"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;="index,
follow"&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;http-equiv&lt;/span&gt;&lt;span class="kwrd"&gt;="Content-Type"&lt;/span&gt; &lt;span class="attr"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;="text/html;
charset=utf-8"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;h3&gt;Download V1 Trial
&lt;/h3&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
What are you waiting for. &lt;a href="http://soetemansoftware.nl/seochecker" target="_blank"&gt;download
SEO Checker&lt;/a&gt; and have a play on your local machine!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=b168215f-975a-45d0-a8c6-f4c83a1b6f07" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,b168215f-975a-45d0-a8c6-f4c83a1b6f07.aspx</comments>
      <category>SEO Checker</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=d1acb552-0722-4ecf-b448-e69888fee4ec</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,d1acb552-0722-4ecf-b448-e69888fee4ec.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,d1acb552-0722-4ecf-b448-e69888fee4ec.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=d1acb552-0722-4ecf-b448-e69888fee4ec</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The RC is already removed from the version info, a release is around the corner! A
perfect time to talk about validating pages using SEO Checker. To validate a site,
or a portion of a site for SEO issues, open SEO Checker and select the <b>Validate
Pages</b> option from the menu. This will show the following screen. By default the
root is selected, if you want to validate a portion of a site specify the start location.
When the include children is checked all published children will be validated also.
When you hit start the pages will be added to the validation queue. 
</p>
        <p>
 <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/ValidatepagesusingSEOChecker_C1D2/validate%20pages_5.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="validate pages" border="0" alt="validate pages" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/ValidatepagesusingSEOChecker_C1D2/validate%20pages_thumb_1.png" width="880" height="283" /></a></p>
        <p>
Besides this manual process, pages will be added to the validation queue when they
are published also. <b>Only published pages having a template assigned will be validated!</b></p>
        <h2>Validation queue
</h2>
        <p>
        </p>
        <p>
Pages will not be validated immediately, instead they will be added to the validation
queue. Validation occurs on the background so you will not have to wait until the
validation process is finished. When all pages are validated the result will be available
in the Validation issues overview.
</p>
        <p>
          <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="validationqueue-small" border="0" alt="validationqueue-small" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/ValidatepagesusingSEOChecker_C1D2/validationqueue-small_3.png" width="891" height="295" />
        </p>
        <p>
        </p>
        <h2>Validation issues
</h2>
        <p>
This overview will show all issues found when validating the page. The documentation
will contain a full list of validation when it’s released. When an issue contains
the description “Template issue” it means that the issue is found in the template.
A template issue is only reported once for every template instead of reported on every
document that uses the template. 
</p>
        <p>
          <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ValidationIssues-markedwithoptions" border="0" alt="ValidationIssues-markedwithoptions" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/ValidatepagesusingSEOChecker_C1D2/ValidationIssues-markedwithoptions_3.png" width="913" height="619" />
        </p>
        <p>
          <strong>Options:</strong>
        </p>
        <ol>
          <li>
When selected warnings will included in the overview. 
</li>
          <li>
When selected errors will included in the overview. 
</li>
          <li>
When a period is selected solved items since the selected period are also displayed
in the overview. Solved issues are displayed in strikethrough. In the example above
the metadata issues are solved. 
</li>
          <li>
Opens the document in a popup 
</li>
          <li>
Opens the template assigned to the document in a popup. This option will only be available
for Users that have access 
</li>
          <li>
Deletes the issue from the overview, or adds the item to the ignore list. 
</li>
        </ol>
        <h2>Delete and ignore issues
</h2>
        <p>
Using the delete button in the various overviews you can delete an issue from the
overview. This will show the following dialog.
</p>
        <p>
          <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="deleteissuedialog" border="0" alt="deleteissuedialog" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/ValidatepagesusingSEOChecker_C1D2/deleteissuedialog_3.png" width="409" height="309" />
        </p>
        <p>
        </p>
        <p>
When you hit “delete” it will just remove the item from the overview. Next time validation
occurs the issue will be reported again. When you check the “Ignore this issue next
time” checkbox the item will be added to the ignore list and the issue will not be
reported again next time validation occurs. Use the Ignore list overviews to see which
items are ignored.
</p>
        <h4>
        </h4>
        <h2>Download
</h2>
        <p>
Want to try SEO Checker today? <a href="soetemansoftware.nl/downloads/seochecker-1.0-rc.zip" target="_blank">Download
the release candidate.</a></p>
        <p>
          <strong>Non production Warning: 
<br /></strong>This is a  release candidate!! SEO checker is tested on different sites
but can still have some issues in specific situations. We love to get some feedback
but don't use this package in production yet! If you find any issues please send us
an email support@soetemansoftware.nl and we will get back to you ASAP!  Also
keep an eye on our <a href="http://www.richardsoeteman.net/ct.ashx?id=de2181e8-66ce-400f-8712-ef9d84741b58&amp;url=http%3a%2f%2fhotfix.soetemansoftware.nl%2fseochecker%2f">hotfix
location</a>! Here you find the most recent bugfixes.  The release candidate
will expire on May 1th 2013. After May 1th it will fall back to trial mode which means
it will only work on localhost and you can only validate one page at a time.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=d1acb552-0722-4ecf-b448-e69888fee4ec" />
      </body>
      <title>Validate pages using SEO Checker</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,d1acb552-0722-4ecf-b448-e69888fee4ec.aspx</guid>
      <link>http://www.richardsoeteman.net/2013/02/04/ValidatePagesUsingSEOChecker.aspx</link>
      <pubDate>Mon, 04 Feb 2013 13:32:47 GMT</pubDate>
      <description>&lt;p&gt;
The RC is already removed from the version info, a release is around the corner! A
perfect time to talk about validating pages using SEO Checker. To validate a site,
or a portion of a site for SEO issues, open SEO Checker and select the &lt;b&gt;Validate
Pages&lt;/b&gt; option from the menu. This will show the following screen. By default the
root is selected, if you want to validate a portion of a site specify the start location.
When the include children is checked all published children will be validated also.
When you hit start the pages will be added to the validation queue. 
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/ValidatepagesusingSEOChecker_C1D2/validate%20pages_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="validate pages" border="0" alt="validate pages" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/ValidatepagesusingSEOChecker_C1D2/validate%20pages_thumb_1.png" width="880" height="283" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Besides this manual process, pages will be added to the validation queue when they
are published also. &lt;b&gt;Only published pages having a template assigned will be validated!&lt;/b&gt;
&lt;/p&gt;
&lt;h2&gt;Validation queue
&lt;/h2&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Pages will not be validated immediately, instead they will be added to the validation
queue. Validation occurs on the background so you will not have to wait until the
validation process is finished. When all pages are validated the result will be available
in the Validation issues overview.
&lt;/p&gt;
&lt;p&gt;
&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="validationqueue-small" border="0" alt="validationqueue-small" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/ValidatepagesusingSEOChecker_C1D2/validationqueue-small_3.png" width="891" height="295" /&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;h2&gt;Validation issues
&lt;/h2&gt;
&lt;p&gt;
This overview will show all issues found when validating the page. The documentation
will contain a full list of validation when it’s released. When an issue contains
the description “Template issue” it means that the issue is found in the template.
A template issue is only reported once for every template instead of reported on every
document that uses the template. 
&lt;/p&gt;
&lt;p&gt;
&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ValidationIssues-markedwithoptions" border="0" alt="ValidationIssues-markedwithoptions" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/ValidatepagesusingSEOChecker_C1D2/ValidationIssues-markedwithoptions_3.png" width="913" height="619" /&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Options:&lt;/strong&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
When selected warnings will included in the overview. 
&lt;/li&gt;
&lt;li&gt;
When selected errors will included in the overview. 
&lt;/li&gt;
&lt;li&gt;
When a period is selected solved items since the selected period are also displayed
in the overview. Solved issues are displayed in strikethrough. In the example above
the metadata issues are solved. 
&lt;/li&gt;
&lt;li&gt;
Opens the document in a popup 
&lt;/li&gt;
&lt;li&gt;
Opens the template assigned to the document in a popup. This option will only be available
for Users that have access 
&lt;/li&gt;
&lt;li&gt;
Deletes the issue from the overview, or adds the item to the ignore list. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Delete and ignore issues
&lt;/h2&gt;
&lt;p&gt;
Using the delete button in the various overviews you can delete an issue from the
overview. This will show the following dialog.
&lt;/p&gt;
&lt;p&gt;
&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="deleteissuedialog" border="0" alt="deleteissuedialog" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/ValidatepagesusingSEOChecker_C1D2/deleteissuedialog_3.png" width="409" height="309" /&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
When you hit “delete” it will just remove the item from the overview. Next time validation
occurs the issue will be reported again. When you check the “Ignore this issue next
time” checkbox the item will be added to the ignore list and the issue will not be
reported again next time validation occurs. Use the Ignore list overviews to see which
items are ignored.
&lt;/p&gt;
&lt;h4&gt;
&lt;/h4&gt;
&lt;h2&gt;Download
&lt;/h2&gt;
&lt;p&gt;
Want to try SEO Checker today? &lt;a href="soetemansoftware.nl/downloads/seochecker-1.0-rc.zip" target="_blank"&gt;Download
the release candidate.&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Non production Warning: 
&lt;br /&gt;
&lt;/strong&gt;This is a&amp;#160; release candidate!! SEO checker is tested on different sites
but can still have some issues in specific situations. We love to get some feedback
but don't use this package in production yet! If you find any issues please send us
an email support@soetemansoftware.nl and we will get back to you ASAP!&amp;#160; Also
keep an eye on our &lt;a href="http://www.richardsoeteman.net/ct.ashx?id=de2181e8-66ce-400f-8712-ef9d84741b58&amp;amp;url=http%3a%2f%2fhotfix.soetemansoftware.nl%2fseochecker%2f"&gt;hotfix
location&lt;/a&gt;! Here you find the most recent bugfixes.&amp;#160; The release candidate
will expire on May 1th 2013. After May 1th it will fall back to trial mode which means
it will only work on localhost and you can only validate one page at a time.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=d1acb552-0722-4ecf-b448-e69888fee4ec" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,d1acb552-0722-4ecf-b448-e69888fee4ec.aspx</comments>
      <category>SEO Checker</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=de2181e8-66ce-400f-8712-ef9d84741b58</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,de2181e8-66ce-400f-8712-ef9d84741b58.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,de2181e8-66ce-400f-8712-ef9d84741b58.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=de2181e8-66ce-400f-8712-ef9d84741b58</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
After releasing the <a href="http://www.richardsoeteman.net/2012/11/30/SEOCheckerV10Beta.aspx" target="_blank">beta
version of SEO Checker</a> almost two months ago, it’s time for a <a href="http://soetemansoftware.nl/downloads/seochecker-1.0-rc.zip" target="_blank">release
candidate</a>. An exciting time because if all goes well we have the final release
available in just a few weeks(it’s all about writing the user manual ;-) ). The release
candidate solves the following issues found in the beta version:
</p>
        <ul>
          <li>
Fixed encoding issues in the validation process 
</li>
          <li>
Added a validator to prevent robots.txt, or meta follow/index  is blocking the
whole site being crawled 
</li>
          <li>
If a robots.txt file exist on disk, use that one instead of generating a dynamic one 
</li>
          <li>
Fixed several issues regarding  url rewriting 
</li>
          <li>
Fixed several issues regarding broken inbound links 
</li>
          <li>
Changed low level error messages to user friendly ones when an exception occurs 
</li>
          <li>
Added several improvements in configuration 
</li>
          <li>
Fixed Umbraco V6 RC compatibility issues 
</li>
        </ul>
        <p>
If you already installed SEO Checker beta it’s best to upgrade since the beta expires
February 1th and upgrading is easy, just use the package installer. So what are you
waiting for….<a href="http://soetemansoftware.nl/downloads/seochecker-1.0-rc.zip" target="_blank">download
the RC today</a></p>
        <p>
          <strong>Non production Warning: 
<br /></strong>This is a  release candidate!! SEO checker is tested on different sites
but can still have some issues in specific situations. We love to get some feedback
but don't use this package in production! If you find any issues please send us an
email support@soetemansoftware.nl and we will get back to you ASAP!  Also keep
an eye on our <a href="http://hotfix.soetemansoftware.nl/seochecker/" target="_blank">hotfix
location</a>! Here you find the most recent bugfixes.  The release candidate
will expire on May 1th 2013. After May 1th it will fall back to trial mode which means
it will only work on localhost and you can only validate one page at a time. 
</p>
        <p>
        </p>
        <p>
          <strong>
            <font size="4">
            </font>
          </strong>
        </p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=de2181e8-66ce-400f-8712-ef9d84741b58" />
      </body>
      <title>SEO Checker RC is here</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,de2181e8-66ce-400f-8712-ef9d84741b58.aspx</guid>
      <link>http://www.richardsoeteman.net/2013/01/22/SEOCheckerRCIsHere.aspx</link>
      <pubDate>Tue, 22 Jan 2013 20:58:32 GMT</pubDate>
      <description>&lt;p&gt;
After releasing the &lt;a href="http://www.richardsoeteman.net/2012/11/30/SEOCheckerV10Beta.aspx" target="_blank"&gt;beta
version of SEO Checker&lt;/a&gt; almost two months ago, it’s time for a &lt;a href="http://soetemansoftware.nl/downloads/seochecker-1.0-rc.zip" target="_blank"&gt;release
candidate&lt;/a&gt;. An exciting time because if all goes well we have the final release
available in just a few weeks(it’s all about writing the user manual ;-) ). The release
candidate solves the following issues found in the beta version:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Fixed encoding issues in the validation process 
&lt;/li&gt;
&lt;li&gt;
Added a validator to prevent robots.txt, or meta follow/index&amp;#160; is blocking the
whole site being crawled 
&lt;/li&gt;
&lt;li&gt;
If a robots.txt file exist on disk, use that one instead of generating a dynamic one 
&lt;/li&gt;
&lt;li&gt;
Fixed several issues regarding&amp;#160; url rewriting 
&lt;/li&gt;
&lt;li&gt;
Fixed several issues regarding broken inbound links 
&lt;/li&gt;
&lt;li&gt;
Changed low level error messages to user friendly ones when an exception occurs 
&lt;/li&gt;
&lt;li&gt;
Added several improvements in configuration 
&lt;/li&gt;
&lt;li&gt;
Fixed Umbraco V6 RC compatibility issues 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
If you already installed SEO Checker beta it’s best to upgrade since the beta expires
February 1th and upgrading is easy, just use the package installer. So what are you
waiting for….&lt;a href="http://soetemansoftware.nl/downloads/seochecker-1.0-rc.zip" target="_blank"&gt;download
the RC today&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Non production Warning: 
&lt;br /&gt;
&lt;/strong&gt;This is a&amp;#160; release candidate!! SEO checker is tested on different sites
but can still have some issues in specific situations. We love to get some feedback
but don't use this package in production! If you find any issues please send us an
email support@soetemansoftware.nl and we will get back to you ASAP!&amp;#160; Also keep
an eye on our &lt;a href="http://hotfix.soetemansoftware.nl/seochecker/" target="_blank"&gt;hotfix
location&lt;/a&gt;! Here you find the most recent bugfixes.&amp;#160; The release candidate
will expire on May 1th 2013. After May 1th it will fall back to trial mode which means
it will only work on localhost and you can only validate one page at a time. 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;font size="4"&gt;&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=de2181e8-66ce-400f-8712-ef9d84741b58" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,de2181e8-66ce-400f-8712-ef9d84741b58.aspx</comments>
      <category>Package</category>
      <category>SEO Checker</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=9bc76e34-45d5-4576-9411-e9c7b92102b0</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,9bc76e34-45d5-4576-9411-e9c7b92102b0.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,9bc76e34-45d5-4576-9411-e9c7b92102b0.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=9bc76e34-45d5-4576-9411-e9c7b92102b0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A couple of weeks ago <a href="http://www.richardsoeteman.net/2012/11/30/SEOCheckerV10Beta.aspx" target="_blank">I
blogged about SEO Checker</a>. With the first release candidate and final release
around the corner it’s time to highlight some features. Today I want to talk about
fixing Inbound Links.We all had this experience, searching for information and found
a page in Google and when we hit that link we get a 404 page, friendly message or
not it’s not the best experience and Google doesn’t like this either.
</p>
        <p>
In the example below I’m using the basic starter kit that comes with Umbraco and visit
the page gofurther.aspx. the 404 page will be shown, but SEO Checker will also log
the url.  When you open the  Inbound link error page in SEO Checker you
will see that gofurther.aspx is reported as broken. Using the content picker you can
select the page you want to redirect to. Next time someone is visiting the gofurther.aspx
the request is redirected to the selected page.
</p>
        <p>
 <img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="InboundLinkErrors" border="0" alt="InboundLinkErrors" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FixinboundlinkissuesusingSEOChecker_F0DA/InboundLinkErrors_6.png" width="902" height="499" />   
</p>
        <p>
        </p>
        <h3>Handling different extensions
</h3>
        <p>
If you migrate a site from php environment you can setup the same structure in your
umbraco site. Let’s say the previous php site had this structure:
</p>
        <ul>
          <li>
mytestsite.com/ 
<ul><li>
mytestsite.com/installing-modules.php 
</li><li>
mytestsite.com/go-further.php 
</li><li>
mytestsite.com/getting-started.php 
</li></ul></li>
        </ul>
        <p>
Our new Umbraco site is using aspx extensions (or no extensions at all), so when we
try to access the installing-modules.php page, the visitor will see a 404 page. 
If you have SEO Checker installed it will make sure the <strong>installing-modules.php</strong> page
will be redirected to the <strong>installing-modules.aspx</strong> page. 
</p>
        <p>
This means search results from Google will still work (and get updated to the new
page because of the 301 redirect) and all links to the php version of your site will
still work. 
</p>
        <p>
When the page cannot be found at all the url will be logged and we can map the correct
url on the Inbound Links page as described in the previous scenario.
</p>
        <h4>Handling structure changes
</h4>
        <p>
When you rename or move a document in Umbraco the structure will change. For example
when we change the Installing modules page to Installing Umbraco modules. The url
changes from installing-modules.aspx to installing-umbraco-modules.aspx. The result
will be that when people are visiting the old installing-modules.aspx  url, they
will see a 404 instead of the Page. SEO Checker will keep track of changes in the
url structure and will redirect the old <strong>installing-modules.aspx</strong> 
url to the new <strong>installing-umbraco-modules.aspx </strong>url. 
</p>
        <p>
If you are only interested in this scenario you might want to check out the free <a href="http://our.umbraco.org/projects/developer-tools/301-url-tracker" target="_blank">301
Url Tracker</a> package. 
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=9bc76e34-45d5-4576-9411-e9c7b92102b0" />
      </body>
      <title>Fix inbound link issues using SEO Checker</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,9bc76e34-45d5-4576-9411-e9c7b92102b0.aspx</guid>
      <link>http://www.richardsoeteman.net/2013/01/16/FixInboundLinkIssuesUsingSEOChecker.aspx</link>
      <pubDate>Wed, 16 Jan 2013 09:51:44 GMT</pubDate>
      <description>&lt;p&gt;
A couple of weeks ago &lt;a href="http://www.richardsoeteman.net/2012/11/30/SEOCheckerV10Beta.aspx" target="_blank"&gt;I
blogged about SEO Checker&lt;/a&gt;. With the first release candidate and final release
around the corner it’s time to highlight some features. Today I want to talk about
fixing Inbound Links.We all had this experience, searching for information and found
a page in Google and when we hit that link we get a 404 page, friendly message or
not it’s not the best experience and Google doesn’t like this either.
&lt;/p&gt;
&lt;p&gt;
In the example below I’m using the basic starter kit that comes with Umbraco and visit
the page gofurther.aspx. the 404 page will be shown, but SEO Checker will also log
the url.&amp;#160; When you open the&amp;#160; Inbound link error page in SEO Checker you
will see that gofurther.aspx is reported as broken. Using the content picker you can
select the page you want to redirect to. Next time someone is visiting the gofurther.aspx
the request is redirected to the selected page.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&lt;img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="InboundLinkErrors" border="0" alt="InboundLinkErrors" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FixinboundlinkissuesusingSEOChecker_F0DA/InboundLinkErrors_6.png" width="902" height="499" /&gt;&amp;#160;&amp;#160; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;h3&gt;Handling different extensions
&lt;/h3&gt;
&lt;p&gt;
If you migrate a site from php environment you can setup the same structure in your
umbraco site. Let’s say the previous php site had this structure:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
mytestsite.com/ 
&lt;ul&gt;
&lt;li&gt;
mytestsite.com/installing-modules.php 
&lt;/li&gt;
&lt;li&gt;
mytestsite.com/go-further.php 
&lt;/li&gt;
&lt;li&gt;
mytestsite.com/getting-started.php 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Our new Umbraco site is using aspx extensions (or no extensions at all), so when we
try to access the installing-modules.php page, the visitor will see a 404 page.&amp;#160;
If you have SEO Checker installed it will make sure the &lt;strong&gt;installing-modules.php&lt;/strong&gt; page
will be redirected to the &lt;strong&gt;installing-modules.aspx&lt;/strong&gt; page. 
&lt;/p&gt;
&lt;p&gt;
This means search results from Google will still work (and get updated to the new
page because of the 301 redirect) and all links to the php version of your site will
still work. 
&lt;/p&gt;
&lt;p&gt;
When the page cannot be found at all the url will be logged and we can map the correct
url on the Inbound Links page as described in the previous scenario.
&lt;/p&gt;
&lt;h4&gt;Handling structure changes
&lt;/h4&gt;
&lt;p&gt;
When you rename or move a document in Umbraco the structure will change. For example
when we change the Installing modules page to Installing Umbraco modules. The url
changes from installing-modules.aspx to installing-umbraco-modules.aspx. The result
will be that when people are visiting the old installing-modules.aspx&amp;#160; url, they
will see a 404 instead of the Page. SEO Checker will keep track of changes in the
url structure and will redirect the old &lt;strong&gt;installing-modules.aspx&lt;/strong&gt;&amp;#160;
url to the new &lt;strong&gt;installing-umbraco-modules.aspx &lt;/strong&gt;url. 
&lt;/p&gt;
&lt;p&gt;
If you are only interested in this scenario you might want to check out the free &lt;a href="http://our.umbraco.org/projects/developer-tools/301-url-tracker" target="_blank"&gt;301
Url Tracker&lt;/a&gt; package. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=9bc76e34-45d5-4576-9411-e9c7b92102b0" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,9bc76e34-45d5-4576-9411-e9c7b92102b0.aspx</comments>
      <category>Package</category>
      <category>SEO Checker</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=876e943a-9d63-4c2f-b9b5-475fe4634d63</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,876e943a-9d63-4c2f-b9b5-475fe4634d63.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,876e943a-9d63-4c2f-b9b5-475fe4634d63.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=876e943a-9d63-4c2f-b9b5-475fe4634d63</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
  
<br />
For those of you following me <a href="https://twitter.com/rsoeteman" target="_blank">on
twitter</a> probably know I’ve been working on a new package, SEO checker for the
last few months(thinking about it for a few years). Today it’s time to finally release
the first beta version of this package and this is the first blog post giving you
an overview of most possibilities. The next blog posts will cover more detailed information
about a certain feature.
</p>
        <p>
SEO Checker is build to optimize your Umbraco Site SEO! It will help you <strong>find
common SEO issues</strong> on the website, help you pages <strong>rank better for
a certain keyword</strong> by making sure that keyword is found on the necessary HTML
elements. It comes from the idea that most Umbraco websites have SEO Issues, missing
meta tags, canonical url’s , broken links, test content, inline scripting, huge viewstate
(my favorite ;-)) etc. When you install SEO Checker you will find a new section where
you can validate pages, find inbound link errors and find configuration errors. 
</p>
        <p>
I’ve <a href="https://vimeo.com/tag:seochecker" target="_blank">recorded a few screencasts</a> that
demo the functionality, check them out. I would love to have feedback so please read
further, watch the screencasts,  install the package and let me know what you
think.
</p>
        <h3>
        </h3>
        <h3>Validate pages
</h3>
        <p>
SEO checker allows you to validate a complete  site, or portions of a site. Simply
select validate pages from the menu, select a root node and hit start, as you can
see in the image below.  
<br />
Validation happens on a background thread, you can validate 1000 pages without having
to wait for the results before leaving the page. Instead pages are added to the validation
queue first. 
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_12.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_thumb_5.png" width="717" height="380" />
          </a>
        </p>
        <p>
          <strong>When you publish a page it will automatically being added to the validation
queue by default</strong>. 
</p>
        <p>
Once the validation queue is empty you can open the validation issues page which gives
you an overview of all validation issues for a given page or template. All validations
are (somehow) based on the <a href="http://tinyurl.com/yjm24yq" target="_blank">Search
Engine Optimization Starter Guide</a> document from Google , so it’s based on facts
and not on opinions from SEO consultants. You can filter the overview by errors and 
warnings.It’s also possible to show resolved issues since a given date. The image
below shows you the url to simplesite.com is resolved and shows you a few open issues.
You can edit the page, or template directly from this overview. It’s also possible
to delete the item from the overview. When you delete the item you can select the
option to always ignore the issue during validation. 
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_13.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_thumb.png" width="990" height="357" />
          </a>
        </p>
        <p>
 
</p>
        <h3>SEO checker datatype
</h3>
        <p>
SEO checker allows you to preview the Google search result snippet using the SEO checker
datatype when editing content  and will give feedback about keyword usage in
content and meta information. The same datatype will report validation issues based
on the <strong>unpublished version</strong> of the document. This allows you to <strong>fix
all issues before publishing</strong> the page to your website. In the image below
you’ll see that we want to rank the page for <strong>Umbraco Modules.  </strong>If
the keyword is not found in a certain tag, this will be reported as a validation issue.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_6.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_thumb_2.png" width="591" height="395" />
          </a>
        </p>
        <p>
SEO checker will look for the focus keyword in the following tags:
</p>
        <ul>
          <li>
Title 
</li>
          <li>
Meta description 
</li>
          <li>
H1 
</li>
          <li>
Body 
</li>
          <li>
Url of the page 
</li>
        </ul>
        <p>
SEO checker will also report any other content related issue it found on the page.
In this case it found the broken link htp://www.umbraco.com. SEO checker knows this
must be <a href="http://www.umbraco.com/">http://www.umbraco.com/</a> and suggest
you will use http:// instead of htp:// in the error description.
</p>
        <h3>
        </h3>
        <h3>Fix and avoid Inbound link issues
</h3>
        <p>
SEO checker will report any inbound link that is broken. To fix a broken link you
select the page you want to redirect to and the next time a user is browsing to the
broken link the user will be redirected to that selected page. In the example below
the user requested installin-modulezz.aspx. This was reported as broken. and is now
pointing to the installing modules page. So the next time a user is requesting the
installin-modulezz.aspx the request will be redirected to installing-modules.aspx.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_8.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_thumb_3.png" width="490" height="208" />
          </a>
        </p>
        <p>
Seo checker will avoid broken links by redirecting  url’s with the wrong extension
to the correct one. So if a user is requesting <a href="http://www.somesite.nl/modules.php">http://www.somesite.nl/modules.<strong>php</strong></a> the
request will be redirected to <a href="http://www.somesite.nl/modules.aspx">http://www.somesite.nl/modules.<strong>aspx</strong></a><strong>.</strong> When
you<strong> rename or move a document</strong> inside Umbraco SEO checker will makes
sure <strong>every request for the old url is redirected to the new url</strong>.
</p>
        <h3>Dynamic robots.txt and sitemap.xml
</h3>
        <p>
SEO checker allows you to generate a dynamic Robots.txt and Sitemap.xml files. This
will make sure search engines don’t index Umbraco system folders and allows you to
submit an xml sitemap to Google. You can specify settings for the xml sitemap per
document type, so if you want to exclude a certain document type or change the priority
it’s possible with a few clicks. 
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_10.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_thumb_4.png" width="531" height="312" />
          </a>  
</p>
        <h3>URL Rewriting
</h3>
        <p>
You want to make sure every page can be accessed by one url. If a url can be accessed
with and without www. prefix for example, search engines treat those url’s as unique
and it can cost you page rank. When I was building SEO checker I had some issues with
URL rewriting by editing the XML configuration files. To make it easier for you SEO
checker comes with a built-in URL rewriting module that you can configure with a few
mouse clicks (only one if you are not using directory url’s).  
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_15.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_thumb_1.png" width="395" height="99" />
          </a>
        </p>
        <h3>Requirements
</h3>
        <p>
SEO checker requires: 
</p>
        <ul>
          <li>
IIS7 
</li>
          <li>
Umbraco Version 4.8 and up. 
</li>
          <li>
One of the following database SQL Server 2005/2008 (Express), SQL CE 4 and Mysql 
</li>
          <li>
            <div align="left">modify rights to folders: /bin, /umbraco, and /app_data folder 
</div>
          </li>
        </ul>
        <h3>Commercial package
</h3>
        <p>
Once the beta is over SEO checker will be a commercial package.Prices will be the
same as the <a href="http://our.umbraco.org/projects/developer-tools/cmsimport/" target="_blank">CMSImport</a> 
package:
</p>
        <ul>
          <li>
€ 99,00  for a domain license 
</li>
          <li>
€ 299,00 for a server license 
</li>
          <li>
€ 499,00 unlimited license 
</li>
        </ul>
        <h3>Download
</h3>
        <p>
          <strong>Update 1/22/2012 : </strong>
          <a href="http://www.richardsoeteman.net/2013/01/22/SEOCheckerRCIsHere.aspx" target="_blank">SEO
Checker Release candidate is available</a>
        </p>
        <p>
          <a href="http://www.soetemansoftware.nl/downloads/seochecker-1.0-beta.zip" target="_blank">Download
the beta version of SEO checker today</a>. 
</p>
        <p>
          <strong>BETA Warning: 
<br /></strong>This is a Beta release!! SEO checker is tested on different sites but can
still have some issues in specific situations. We love to get some feedback but don't
use this package in production! If you find any issues please send us an email support@soetemansoftware.nl
and we will get back to you ASAP!  This beta version will expire on Feb 1 2013. 
</p>
        <p>
        </p>
        <p>
          <strong>
            <font size="4">
            </font>
          </strong>
        </p>
        <p>
Also keep an eye on our <a href="http://hotfix.soetemansoftware.nl/seochecker/" target="_blank">hotfix
location</a>! Here you find the most recent bugfixes.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=876e943a-9d63-4c2f-b9b5-475fe4634d63" />
      </body>
      <title>SEO checker V1.0 Beta</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,876e943a-9d63-4c2f-b9b5-475fe4634d63.aspx</guid>
      <link>http://www.richardsoeteman.net/2012/11/30/SEOCheckerV10Beta.aspx</link>
      <pubDate>Fri, 30 Nov 2012 09:24:41 GMT</pubDate>
      <description>&lt;p&gt;
&amp;#160; 
&lt;br /&gt;
For those of you following me &lt;a href="https://twitter.com/rsoeteman" target="_blank"&gt;on
twitter&lt;/a&gt; probably know I’ve been working on a new package, SEO checker for the
last few months(thinking about it for a few years). Today it’s time to finally release
the first beta version of this package and this is the first blog post giving you
an overview of most possibilities. The next blog posts will cover more detailed information
about a certain feature.
&lt;/p&gt;
&lt;p&gt;
SEO Checker is build to optimize your Umbraco Site SEO! It will help you &lt;strong&gt;find
common SEO issues&lt;/strong&gt; on the website, help you pages &lt;strong&gt;rank better for
a certain keyword&lt;/strong&gt; by making sure that keyword is found on the necessary HTML
elements. It comes from the idea that most Umbraco websites have SEO Issues, missing
meta tags, canonical url’s , broken links, test content, inline scripting, huge viewstate
(my favorite ;-)) etc. When you install SEO Checker you will find a new section where
you can validate pages, find inbound link errors and find configuration errors. 
&lt;/p&gt;
&lt;p&gt;
I’ve &lt;a href="https://vimeo.com/tag:seochecker" target="_blank"&gt;recorded a few screencasts&lt;/a&gt; that
demo the functionality, check them out. I would love to have feedback so please read
further, watch the screencasts,&amp;#160; install the package and let me know what you
think.
&lt;/p&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;Validate pages
&lt;/h3&gt;
&lt;p&gt;
SEO checker allows you to validate a complete&amp;#160; site, or portions of a site. Simply
select validate pages from the menu, select a root node and hit start, as you can
see in the image below.&amp;#160; 
&lt;br /&gt;
Validation happens on a background thread, you can validate 1000 pages without having
to wait for the results before leaving the page. Instead pages are added to the validation
queue first. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_12.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_thumb_5.png" width="717" height="380" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;When you publish a page it will automatically being added to the validation
queue by default&lt;/strong&gt;. 
&lt;/p&gt;
&lt;p&gt;
Once the validation queue is empty you can open the validation issues page which gives
you an overview of all validation issues for a given page or template. All validations
are (somehow) based on the &lt;a href="http://tinyurl.com/yjm24yq" target="_blank"&gt;Search
Engine Optimization Starter Guide&lt;/a&gt; document from Google , so it’s based on facts
and not on opinions from SEO consultants. You can filter the overview by errors and&amp;#160;
warnings.It’s also possible to show resolved issues since a given date. The image
below shows you the url to simplesite.com is resolved and shows you a few open issues.
You can edit the page, or template directly from this overview. It’s also possible
to delete the item from the overview. When you delete the item you can select the
option to always ignore the issue during validation. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_13.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_thumb.png" width="990" height="357" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;h3&gt;SEO checker datatype
&lt;/h3&gt;
&lt;p&gt;
SEO checker allows you to preview the Google search result snippet using the SEO checker
datatype when editing content&amp;#160; and will give feedback about keyword usage in
content and meta information. The same datatype will report validation issues based
on the &lt;strong&gt;unpublished version&lt;/strong&gt; of the document. This allows you to &lt;strong&gt;fix
all issues before publishing&lt;/strong&gt; the page to your website. In the image below
you’ll see that we want to rank the page for &lt;strong&gt;Umbraco Modules.&amp;#160; &lt;/strong&gt;If
the keyword is not found in a certain tag, this will be reported as a validation issue.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_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="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_thumb_2.png" width="591" height="395" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
SEO checker will look for the focus keyword in the following tags:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Title 
&lt;/li&gt;
&lt;li&gt;
Meta description 
&lt;/li&gt;
&lt;li&gt;
H1 
&lt;/li&gt;
&lt;li&gt;
Body 
&lt;/li&gt;
&lt;li&gt;
Url of the page 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
SEO checker will also report any other content related issue it found on the page.
In this case it found the broken link htp://www.umbraco.com. SEO checker knows this
must be &lt;a href="http://www.umbraco.com/"&gt;http://www.umbraco.com/&lt;/a&gt; and suggest
you will use http:// instead of htp:// in the error description.
&lt;/p&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;Fix and avoid Inbound link issues
&lt;/h3&gt;
&lt;p&gt;
SEO checker will report any inbound link that is broken. To fix a broken link you
select the page you want to redirect to and the next time a user is browsing to the
broken link the user will be redirected to that selected page. In the example below
the user requested installin-modulezz.aspx. This was reported as broken. and is now
pointing to the installing modules page. So the next time a user is requesting the
installin-modulezz.aspx the request will be redirected to installing-modules.aspx.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_thumb_3.png" width="490" height="208" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Seo checker will avoid broken links by redirecting&amp;#160; url’s with the wrong extension
to the correct one. So if a user is requesting &lt;a href="http://www.somesite.nl/modules.php"&gt;http://www.somesite.nl/modules.&lt;strong&gt;php&lt;/strong&gt;&lt;/a&gt; the
request will be redirected to &lt;a href="http://www.somesite.nl/modules.aspx"&gt;http://www.somesite.nl/modules.&lt;strong&gt;aspx&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; When
you&lt;strong&gt; rename or move a document&lt;/strong&gt; inside Umbraco SEO checker will makes
sure &lt;strong&gt;every request for the old url is redirected to the new url&lt;/strong&gt;.
&lt;/p&gt;
&lt;h3&gt;Dynamic robots.txt and sitemap.xml
&lt;/h3&gt;
&lt;p&gt;
SEO checker allows you to generate a dynamic Robots.txt and Sitemap.xml files. This
will make sure search engines don’t index Umbraco system folders and allows you to
submit an xml sitemap to Google. You can specify settings for the xml sitemap per
document type, so if you want to exclude a certain document type or change the priority
it’s possible with a few clicks. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_thumb_4.png" width="531" height="312" /&gt;&lt;/a&gt;&amp;#160; 
&lt;/p&gt;
&lt;h3&gt;URL Rewriting
&lt;/h3&gt;
&lt;p&gt;
You want to make sure every page can be accessed by one url. If a url can be accessed
with and without www. prefix for example, search engines treat those url’s as unique
and it can cost you page rank. When I was building SEO checker I had some issues with
URL rewriting by editing the XML configuration files. To make it easier for you SEO
checker comes with a built-in URL rewriting module that you can configure with a few
mouse clicks (only one if you are not using directory url’s).&amp;#160; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_15.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/SEOCheckerV1.0Beta_C67E/image_thumb_1.png" width="395" height="99" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;h3&gt;Requirements
&lt;/h3&gt;
&lt;p&gt;
SEO checker requires: 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
IIS7 
&lt;/li&gt;
&lt;li&gt;
Umbraco Version 4.8 and up. 
&lt;/li&gt;
&lt;li&gt;
One of the following database SQL Server 2005/2008 (Express), SQL CE 4 and Mysql 
&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;modify rights to folders: /bin, /umbraco, and /app_data folder 
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Commercial package
&lt;/h3&gt;
&lt;p&gt;
Once the beta is over SEO checker will be a commercial package.Prices will be the
same as the &lt;a href="http://our.umbraco.org/projects/developer-tools/cmsimport/" target="_blank"&gt;CMSImport&lt;/a&gt;&amp;#160;
package:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
€ 99,00&amp;#160; for a domain license 
&lt;/li&gt;
&lt;li&gt;
€ 299,00 for a server license 
&lt;/li&gt;
&lt;li&gt;
€ 499,00 unlimited license 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Download
&lt;/h3&gt;
&lt;p&gt;
&lt;strong&gt;Update 1/22/2012 : &lt;/strong&gt;&lt;a href="http://www.richardsoeteman.net/2013/01/22/SEOCheckerRCIsHere.aspx" target="_blank"&gt;SEO
Checker Release candidate is available&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.soetemansoftware.nl/downloads/seochecker-1.0-beta.zip" target="_blank"&gt;Download
the beta version of SEO checker today&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;BETA Warning: 
&lt;br /&gt;
&lt;/strong&gt;This is a Beta release!! SEO checker is tested on different sites but can
still have some issues in specific situations. We love to get some feedback but don't
use this package in production! If you find any issues please send us an email support@soetemansoftware.nl
and we will get back to you ASAP!&amp;#160; This beta version will expire on Feb 1 2013. 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;font size="4"&gt;&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Also keep an eye on our &lt;a href="http://hotfix.soetemansoftware.nl/seochecker/" target="_blank"&gt;hotfix
location&lt;/a&gt;! Here you find the most recent bugfixes.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=876e943a-9d63-4c2f-b9b5-475fe4634d63" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,876e943a-9d63-4c2f-b9b5-475fe4634d63.aspx</comments>
      <category>Package</category>
      <category>SEO Checker</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=8cf2d4fb-021b-4b71-90ba-b4ea2ada9046</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,8cf2d4fb-021b-4b71-90ba-b4ea2ada9046.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,8cf2d4fb-021b-4b71-90ba-b4ea2ada9046.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=8cf2d4fb-021b-4b71-90ba-b4ea2ada9046</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A couple of months ago, Umbraco V4.8 was released and when I was testing CMSImport
against this version I got a weird exception. 
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Supportmultipleversionsofastronglynameda_908C/dllerror_4.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="dllerror" border="0" alt="dllerror" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Supportmultipleversionsofastronglynameda_908C/dllerror_thumb_1.png" width="1160" height="446" />
          </a>
        </p>
        <h2>What happened?
</h2>
        <p>
I’m using the <a href="http://htmlagilitypack.codeplex.com/" target="_blank">HTMLAgilityPack</a> to
extract images and files from the bodytext property so we can import them into Umbraco.
In previous versions, Umbraco shipped with the 1.3.0 version. The version of the HTMLAgilityPack
that is shipped in 4.8+ is version 1.4.5.0. Since the dll is signed it’s throwing
an error in case of a version conflict. I’ve seen a <a href="http://our.umbraco.org/projects/backoffice-extensions/ucomponents/questionssuggestions/33021-Upgrading-to-Umbraco-48-breaks-support-for-uComponents" target="_blank">post
on the forum</a> where <a href="https://twitter.com/leekelleher" target="_blank">Lee
Kelleher</a> describes a similar issue. In the case of UComponents it’s the Lucene
DLL but it’s the same problem as I was facing. To fix this issue as described in the
forum thread requires an entry in the web.config file and putting the Legacy DLL into
a separate folder. It’s all fine to use upgrade instructions for a client project
but when you develop a package you don’t want your customers manual upgrade web.config
files for a specific version. You also don’t want to have a big if statement in your
installer that creates entries based on a version number and you also don’t want to
drop support for older versions of Umbraco because of this minor conflict.
</p>
        <h2>The solution
</h2>
        <p>
After searching a bit, I found this <a href="http://msdn.microsoft.com/en-us/library/ff527268.aspx" target="_blank">interesting
article</a> that describes the <a href="http://msdn.microsoft.com/en-us/library/system.appdomain.assemblyresolve.aspx" target="_blank">AppDomain.AssemblyResolve
Event</a>. This event gets triggered when an Assembly is required that can’t be found
and allows you to return the correct assembly. In our case the DLL Version 1.3.0.0
of HTMLAgilityPack. In the example below you see that I derive my class from ApplicationBase
(I know there is a new class in 4.8, but I’m still supporting 4.7 also ;-)) so this
class will be picked up automatically . When the  required assembly (Args.Name
on line 13) is the HTMLAgilityPack Version 1.3.0 I load that assembly from the /bin/legacy/
location and all is working again :)  
<br /><br /><strong>Update 2-10-2012 Modified source code. It doesn’t use HTTPContext anymore
since that might not be available</strong></p>
        <div class="csharpcode">
          <pre>
            <span class="lnum">
            </span>
            <div class="csharpcode">
              <div class="csharpcode">
                <div class="csharpcode">
                  <pre>
                    <span class="lnum"> 1: </span>
                    <span class="kwrd">public</span>
                    <span class="kwrd">class</span> UpdateThirdPartyDllBindings
: ApplicationBase</pre>
                  <pre>
                    <span class="lnum"> 2: </span> {</pre>
                  <pre>
                    <span class="lnum"> 3: </span>
                    <span class="kwrd">public</span> UpdateThirdPartyDllBindings()</pre>
                  <pre>
                    <span class="lnum"> 4: </span> {</pre>
                  <pre>
                    <span class="lnum"> 5: </span> AppDomain.CurrentDomain.AssemblyResolve
+= <span class="kwrd">new</span> ResolveEventHandler(CurrentDomain_AssemblyResolve);</pre>
                  <pre>
                    <span class="lnum"> 6: </span> }</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">///
Assembly could not be resolved let's see if we can load it dynamically</span>
                  </pre>
                  <pre>
                    <span class="lnum"> 10: </span>
                    <span class="rem">///
&lt;/summary&gt;</span>
                  </pre>
                  <pre>
                    <span class="lnum"> 11: </span> Assembly CurrentDomain_AssemblyResolve(<span class="kwrd">object</span> sender,
ResolveEventArgs args)</pre>
                  <pre>
                    <span class="lnum"> 12: </span> {</pre>
                  <pre>
                    <span class="lnum"> 13: </span>
                    <span class="kwrd">if</span> (args.Name
== <span class="str">"HtmlAgilityPack, Version=1.3.0.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a"</span>)</pre>
                  <pre>
                    <span class="lnum"> 14: </span> {</pre>
                  <pre>
                    <span class="lnum"> 15: </span>
                    <span class="kwrd">try</span>
                  </pre>
                  <pre>
                    <span class="lnum"> 16: </span> {</pre>
                  <pre>
                    <span class="lnum"> 17: </span>
                    <span class="rem">//Get
the bin folder. Don't use HTTPContext since that can be null</span>
                  </pre>
                  <pre>
                    <span class="lnum"> 18: </span>
                    <span class="kwrd">string</span> binFolder
= Path.Combine(AppDomain.CurrentDomain.BaseDirectory, <span class="str">"bin\\legacy"</span>);</pre>
                  <pre>
                    <span class="lnum"> 19: </span>
                    <span class="kwrd">string</span> legacyFile
= Path.Combine(binFolder, <span class="str">"HtmlAgilityPack.dll"</span>);</pre>
                  <pre>
                    <span class="lnum"> 20: </span>
                    <span class="kwrd">return</span> Assembly.LoadFile(legacyFile);</pre>
                  <pre>
                    <span class="lnum"> 21: </span> </pre>
                  <pre>
                    <span class="lnum"> 22: </span> }</pre>
                  <pre>
                    <span class="lnum"> 23: </span>
                    <span class="kwrd">catch</span> (Exception
ex)</pre>
                  <pre>
                    <span class="lnum"> 24: </span> {</pre>
                  <pre>
                    <span class="lnum"> 25: </span> Log.Add(LogTypes.Error,
-1, <span class="kwrd">string</span>.Format(<span class="str">"SEOChecker error
loading HTMLAgilityPack version {0}:{1} "</span>, args.Name, ex));</pre>
                  <pre>
                    <span class="lnum"> 26: </span> }</pre>
                  <pre>
                    <span class="lnum"> 27: </span> }</pre>
                  <pre>
                    <span class="lnum"> 28: </span>
                    <span class="kwrd">return</span>
                    <span class="kwrd">null</span>;</pre>
                  <pre>
                    <span class="lnum"> 29: </span> }</pre>
                  <pre>
                    <span class="lnum"> 30: </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>
              </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>
            </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>
          </pre>
        </div>
        <p>
All I need to do now is make sure the Legacy DLL is shipped in the package. When you
are using an older version of Umbraco this Legacy DLL will exists in your bin folder
but will be ignored and for version 4.8 + the AssemblyResolve implementation will
make sure the legacy DLL is loaded.
</p>
        <p>
Hope this helps you solve version conflicts of dll’s in your own packages
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=8cf2d4fb-021b-4b71-90ba-b4ea2ada9046" />
      </body>
      <title>Support multiple versions of a strongly named assembly in your Umbraco package</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,8cf2d4fb-021b-4b71-90ba-b4ea2ada9046.aspx</guid>
      <link>http://www.richardsoeteman.net/2012/09/25/SupportMultipleVersionsOfAStronglyNamedAssemblyInYourUmbracoPackage.aspx</link>
      <pubDate>Tue, 25 Sep 2012 08:36:02 GMT</pubDate>
      <description>&lt;p&gt;
A couple of months ago, Umbraco V4.8 was released and when I was testing CMSImport
against this version I got a weird exception. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Supportmultipleversionsofastronglynameda_908C/dllerror_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="dllerror" border="0" alt="dllerror" src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/Supportmultipleversionsofastronglynameda_908C/dllerror_thumb_1.png" width="1160" height="446" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;h2&gt;What happened?
&lt;/h2&gt;
&lt;p&gt;
I’m using the &lt;a href="http://htmlagilitypack.codeplex.com/" target="_blank"&gt;HTMLAgilityPack&lt;/a&gt; to
extract images and files from the bodytext property so we can import them into Umbraco.
In previous versions, Umbraco shipped with the 1.3.0 version. The version of the HTMLAgilityPack
that is shipped in 4.8+ is version 1.4.5.0. Since the dll is signed it’s throwing
an error in case of a version conflict. I’ve seen a &lt;a href="http://our.umbraco.org/projects/backoffice-extensions/ucomponents/questionssuggestions/33021-Upgrading-to-Umbraco-48-breaks-support-for-uComponents" target="_blank"&gt;post
on the forum&lt;/a&gt; where &lt;a href="https://twitter.com/leekelleher" target="_blank"&gt;Lee
Kelleher&lt;/a&gt; describes a similar issue. In the case of UComponents it’s the Lucene
DLL but it’s the same problem as I was facing. To fix this issue as described in the
forum thread requires an entry in the web.config file and putting the Legacy DLL into
a separate folder. It’s all fine to use upgrade instructions for a client project
but when you develop a package you don’t want your customers manual upgrade web.config
files for a specific version. You also don’t want to have a big if statement in your
installer that creates entries based on a version number and you also don’t want to
drop support for older versions of Umbraco because of this minor conflict.
&lt;/p&gt;
&lt;h2&gt;The solution
&lt;/h2&gt;
&lt;p&gt;
After searching a bit, I found this &lt;a href="http://msdn.microsoft.com/en-us/library/ff527268.aspx" target="_blank"&gt;interesting
article&lt;/a&gt; that describes the &lt;a href="http://msdn.microsoft.com/en-us/library/system.appdomain.assemblyresolve.aspx" target="_blank"&gt;AppDomain.AssemblyResolve
Event&lt;/a&gt;. This event gets triggered when an Assembly is required that can’t be found
and allows you to return the correct assembly. In our case the DLL Version 1.3.0.0
of HTMLAgilityPack. In the example below you see that I derive my class from ApplicationBase
(I know there is a new class in 4.8, but I’m still supporting 4.7 also ;-)) so this
class will be picked up automatically . When the&amp;#160; required assembly (Args.Name
on line 13) is the HTMLAgilityPack Version 1.3.0 I load that assembly from the /bin/legacy/
location and all is working again :)&amp;#160; 
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Update 2-10-2012 Modified source code. It doesn’t use HTTPContext anymore
since that might not be available&lt;/strong&gt;
&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;&lt;/span&gt;
&lt;div class="csharpcode"&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; UpdateThirdPartyDllBindings
: ApplicationBase&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;public&lt;/span&gt; UpdateThirdPartyDllBindings()&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; AppDomain.CurrentDomain.AssemblyResolve
+= &lt;span class="kwrd"&gt;new&lt;/span&gt; ResolveEventHandler(CurrentDomain_AssemblyResolve);&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;&amp;#160;&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;///
Assembly could not be resolved let's see if we can load it dynamically&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; Assembly CurrentDomain_AssemblyResolve(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender,
ResolveEventArgs args)&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;if&lt;/span&gt; (args.Name
== &lt;span class="str"&gt;&amp;quot;HtmlAgilityPack, Version=1.3.0.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a&amp;quot;&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="kwrd"&gt;try&lt;/span&gt;&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; &lt;span class="rem"&gt;//Get
the bin folder. Don't use HTTPContext since that can be null&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt; 18: &lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; binFolder
= Path.Combine(AppDomain.CurrentDomain.BaseDirectory, &lt;span class="str"&gt;&amp;quot;bin\\legacy&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt; 19: &lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; legacyFile
= Path.Combine(binFolder, &lt;span class="str"&gt;&amp;quot;HtmlAgilityPack.dll&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt; 20: &lt;/span&gt; &lt;span class="kwrd"&gt;return&lt;/span&gt; Assembly.LoadFile(legacyFile);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt; 21: &lt;/span&gt;&amp;#160;&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="kwrd"&gt;catch&lt;/span&gt; (Exception
ex)&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; Log.Add(LogTypes.Error,
-1, &lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(&lt;span class="str"&gt;&amp;quot;SEOChecker error
loading HTMLAgilityPack version {0}:{1} &amp;quot;&lt;/span&gt;, args.Name, ex));&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;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt; 28: &lt;/span&gt; &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;null&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;/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;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;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;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
All I need to do now is make sure the Legacy DLL is shipped in the package. When you
are using an older version of Umbraco this Legacy DLL will exists in your bin folder
but will be ignored and for version 4.8 + the AssemblyResolve implementation will
make sure the legacy DLL is loaded.
&lt;/p&gt;
&lt;p&gt;
Hope this helps you solve version conflicts of dll’s in your own packages
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=8cf2d4fb-021b-4b71-90ba-b4ea2ada9046" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,8cf2d4fb-021b-4b71-90ba-b4ea2ada9046.aspx</comments>
      <category>Package</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=8a19799d-4fc8-4e67-bcb4-37907201cf57</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,8a19799d-4fc8-4e67-bcb4-37907201cf57.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,8a19799d-4fc8-4e67-bcb4-37907201cf57.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=8a19799d-4fc8-4e67-bcb4-37907201cf57</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’ve just released MemberExport 2.0. Apart from another awesome logo by <a href="https://twitter.com/#!/aim24" target="_blank">Arnold
Visser</a>.I’ve added some functionality as well.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/memberexport100x100_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="memberexport100x100" border="0" alt="memberexport100x100" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/memberexport100x100_thumb.png" width="104" height="104" />
          </a>
        </p>
        <h2>Native Excel export
</h2>
        <p>
MemberExport 1.x could only export to a csv file. This is great for most of us but
when you select a wrong separator and want to open the csv file in Excel directly
it will probably looks a bit messy like the example below. 
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/wrongformat_4.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="wrongformat" border="0" alt="wrongformat" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/wrongformat_thumb_1.png" width="1099" height="239" />
          </a>
        </p>
        <p>
          <strong>MemberExport 2.0 Pro</strong> let’s you select the export option csv or Excel
file. When you select Excel file it will export the data to an Excel file instead
of csv and all the data is formatted correctly.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/image_6.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/image_thumb_2.png" width="499" height="475" />
          </a>
        </p>
        <h2>Export provider
</h2>
        <p>
I don’t like closed systems, all of my packages are open for extension. When creating
the Excel export option I wanted the export option to be a provider model. Not only
to make this task easier for myself but also so you can use MemberExport to connect
to your custom ERP system. Implementing an export provider is pretty straight forward.
The example below is the implementation of the CSV Provider. 
</p>
        <h2>CSVProviderUI
</h2>
        <p>
The <strong>CSVProviderUI</strong> class is the class which is responsible for the
UI part of the provider. Add a reference to the <strong>MemberExport.Library dll</strong> and
derive from <strong>ExportProviderUIBase</strong> class. Implement to following methods:
</p>
        <ul>
          <li>
OnInit, create the UI controls 
</li>
          <li>
Initialize, initialize the UI options based on the stored export provider settings.
In this case exportProvider will hold the text delimiter and text indicator options. 
</li>
          <li>
GetOptions will return the export provider settings so we use those settings when
exporting records 
</li>
          <li>
The name property will return the name of the provider stored in the Export as dropdownlist
when selecting an export provider. 
</li>
        </ul>
        <pre class="csharpcode">
          <span class="kwrd">using</span> System; <span class="kwrd">using</span> System.Web.UI; <span class="kwrd">using</span> System.Web.UI.WebControls; <span class="kwrd">using</span> MemberExport.Resources.Helpers; <span class="kwrd">using</span> umbraco.uicontrols; <span class="kwrd">namespace</span> MemberExport.Library.ExportProviders.CSV
{ <span class="rem">/// &lt;summary&gt;</span><span class="rem">/// Renders the Layout
for the CSV Provider</span><span class="rem">/// &lt;/summary&gt;</span><span class="kwrd">public</span><span class="kwrd">class</span> CSVProviderUI
: ExportProviderUIBase, INamingContainer { <span class="kwrd">protected</span> DropDownList
_csvTextIndicatorDropDownList = <span class="kwrd">new</span> DropDownList(); <span class="kwrd">protected</span> DropDownList
_csvSVSeperatorDropDownList = <span class="kwrd">new</span> DropDownList(); <span class="kwrd">protected</span><span class="kwrd">override</span><span class="kwrd">void</span> OnInit(EventArgs
e) { <span class="kwrd">base</span>.OnInit(e); _csvSVSeperatorDropDownList.Items.Add(<span class="kwrd">new</span> ListItem(<span class="str">";"</span>, <span class="str">";"</span>));
_csvSVSeperatorDropDownList.Items.Add(<span class="kwrd">new</span> ListItem(<span class="str">","</span>, <span class="str">","</span>));
_csvTextIndicatorDropDownList.Items.Add(<span class="kwrd">new</span> ListItem(ResourceHelper.Current.GetStringResource(<span class="str">"CSVNoTextIndicator"</span>), <span class="str">""</span>));
_csvTextIndicatorDropDownList.Items.Add(<span class="kwrd">new</span> ListItem(<span class="str">"\""</span>, <span class="str">"\""</span>));
_csvTextIndicatorDropDownList.Items.Add(<span class="kwrd">new</span> ListItem(<span class="str">"\'"</span>, <span class="str">"\'"</span>));
PropertyPanel delimiterPropery = <span class="kwrd">new</span> PropertyPanel(); delimiterPropery.Text
= ResourceHelper.Current.GetStringResource(<span class="str">"CSVSeperatorProperty"</span>);
delimiterPropery.Controls.Add(_csvSVSeperatorDropDownList); PropertyPanel stringIndicatorPropery
= <span class="kwrd">new</span> PropertyPanel(); stringIndicatorPropery.Text = ResourceHelper.Current.GetStringResource(<span class="str">"CSVTextIndicatorProperty"</span>);
stringIndicatorPropery.Controls.Add(_csvTextIndicatorDropDownList); Controls.Add(delimiterPropery);
Controls.Add(stringIndicatorPropery); } <span class="rem">/// &lt;summary&gt;</span><span class="rem">///
Sets the export options (delimiter and string indicator).</span><span class="rem">///
&lt;/summary&gt;</span><span class="rem">/// &lt;param name="exportProvider"&gt;The
export provider.&lt;/param&gt;</span><span class="kwrd">public</span><span class="kwrd">override</span><span class="kwrd">void</span> Initialize(ExportProviderBase
exportProvider) { CSVProvider csvProvider = exportProvider <span class="kwrd">as</span> CSVProvider; <span class="kwrd">if</span> (csvProvider
!= <span class="kwrd">null</span>) { _csvSVSeperatorDropDownList.SelectedValue = csvProvider.Delimiter;
_csvTextIndicatorDropDownList.SelectedValue = csvProvider.StringIndicator; } } <span class="rem">///
&lt;summary&gt;</span><span class="rem">/// Returns the selected export options (delimiter
and string indicator).</span><span class="rem">/// &lt;/summary&gt;</span><span class="rem">///
&lt;returns&gt;&lt;/returns&gt;</span><span class="kwrd">public</span><span class="kwrd">override</span> ExportProviderBase
GetOptions() { CSVProvider csvProvider = <span class="kwrd">new</span> CSVProvider();
csvProvider.Delimiter = _csvSVSeperatorDropDownList.SelectedValue; csvProvider.StringIndicator
= _csvTextIndicatorDropDownList.SelectedValue; <span class="kwrd">return</span> csvProvider;
} <span class="rem">/// &lt;summary&gt;</span><span class="rem">/// Return the name
of the provider. this will be displayed in the selectbox</span><span class="rem">///
&lt;/summary&gt;</span><span class="rem">/// &lt;value&gt;The selected name.&lt;/value&gt;</span><span class="kwrd">public</span><span class="kwrd">override</span><span class="kwrd">string</span> Name
{ get { <span class="kwrd">return</span><span class="str">"CSV file"</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>
        <h2>CsvProvider
</h2>
        <p>
The second part we need implement is the provider itself which handles the actual
export process. Create a new class and derive from <strong>ExportProviderBase</strong>. 
This will give the following methods/properties:
</p>
        <ul>
          <li>
Export, responsible for the export process 
</li>
          <li>
Icon, will be displayed when opening the saved exports tree 
</li>
        </ul>
        <p>
In this implementation we’ve added the StringIndicator and Delimiter options, which
gets set from the UI. The export method will give a list of columns to export and
all records using an <strong>IRecordReader</strong>.  The rest of the code is
implementation specific. Two important things to know when exporting records. 
When assigning a value always use the <strong>ValueParser factory</strong><br /></p>
        <pre class="csharpcode">ValueParser.Parse(reader.GetObject(column.Alias), column));</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>
To write the file to the browser either use the <strong>WriteResponseString</strong> (for
stringvalues ) or <strong>WriteResponseBytes</strong> (for a byte array) methods.
Both methods need the Contenttype (Mimetype) and fileExtension, in this case csv.
</p>
        <pre class="csharpcode">
          <span class="kwrd">using</span> System; <span class="kwrd">using</span> System.Collections.Generic; <span class="kwrd">using</span> MemberExport.Library.Csv; <span class="kwrd">using</span> MemberExport.Library.Members; <span class="kwrd">using</span> MemberExport.Library.Types; <span class="kwrd">namespace</span> MemberExport.Library.ExportProviders.CSV
{ <span class="rem">/// &lt;summary&gt;</span><span class="rem">/// CSV (Default)
implementation of MemberExport</span><span class="rem">/// &lt;/summary&gt;</span> [Serializable()] <span class="kwrd">public</span><span class="kwrd">class</span> CSVProvider
: ExportProviderBase { <span class="rem">/// &lt;summary&gt;</span><span class="rem">///
Exports the data to a csv file</span><span class="rem">/// &lt;/summary&gt;</span><span class="rem">///
&lt;param name="columns"&gt;Collection of column info&lt;/param&gt;</span><span class="rem">///
&lt;param name="reader"&gt;The actual data to export&lt;/param&gt;</span><span class="kwrd">public</span><span class="kwrd">override</span><span class="kwrd">void</span> Export(List&lt;Types.MemberField&gt;
columns, umbraco.DataLayer.IRecordsReader reader) { <span class="rem">//Use a csv
writer object</span> CsvWriter writer = <span class="kwrd">new</span> CsvWriter(Delimiter,
StringIndicator); <span class="rem">//Add columns to export</span><span class="kwrd">foreach</span> (MemberField
field <span class="kwrd">in</span> columns) { writer.Columns.Add(field.Text); } <span class="rem">//Add
data to export</span><span class="kwrd">while</span> (reader.Read()) { <span class="rem">//Get
values for the current row</span> List&lt;<span class="kwrd">object</span>&gt; values
= <span class="kwrd">new</span> List&lt;<span class="kwrd">object</span>&gt;(); <span class="kwrd">foreach</span> (MemberField
column <span class="kwrd">in</span> columns) { values.Add(ValueParser.Parse(reader.GetObject(column.Alias),
column)); } <span class="rem">//write values to csvwriter;</span> writer.Add(values.ToArray());
} <span class="rem">//Write response to the browser</span> WriteResponseString(writer.Parse(), <span class="str">"application/excel"</span>, <span class="str">"csv"</span>);
} <span class="rem">/// &lt;summary&gt;</span><span class="rem">/// Gets or sets
the string indicator.</span><span class="rem">/// &lt;/summary&gt;</span><span class="rem">///
&lt;value&gt;The string indicator.&lt;/value&gt;</span><span class="kwrd">public</span><span class="kwrd">string</span> StringIndicator
{ get; set; } <span class="rem">/// &lt;summary&gt;</span><span class="rem">/// Gets
or sets the delimiter.</span><span class="rem">/// &lt;/summary&gt;</span><span class="rem">///
&lt;value&gt;The delimiter.&lt;/value&gt;</span><span class="kwrd">public</span><span class="kwrd">string</span> Delimiter
{ get; set; } <span class="rem">/// &lt;summary&gt;</span><span class="rem">/// Returns
the icon that will be displayed in the saved tree</span><span class="rem">/// &lt;/summary&gt;</span><span class="rem">///
&lt;value&gt;The icon.&lt;/value&gt;</span><span class="kwrd">public</span><span class="kwrd">override</span><span class="kwrd">string</span> Icon
{ get { <span class="kwrd">return</span><span class="str">"csvexport.gif"</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>That’s all, compile and add to the bin folder of your Umbraco install and
you can use the provider!</strong>
        </p>
        <h2>ValueParsers
</h2>
        <p>
By default MemberExport exports the stored value from  the database. When this
value is an Id value you might want to export the text value instead. This can be
achieved using a value parser. By default MemberExport comes with value parsers for
the following datatypes :
</p>
        <ul>
          <li>
Checkbox 
</li>
          <li>
Dropdownlist 
</li>
          <li>
MNTP 
</li>
          <li>
MuiltipleDropdownlist 
</li>
          <li>
Radiobox 
</li>
          <li>
Ultimatepicker 
</li>
        </ul>
        <p>
In the example below we will write a value parser for the True/false datatype. By
default values will be exported as 1/0. We want the values to be exported as yes/no
for this example. 
</p>
        <p>
          <strong>
            <em>
              <font size="3">Before you ask, this isn’t in the core because some people
want 0/1, some true/false, some yes/no etc.</font>
            </em>
          </strong>
        </p>
        <p>
First we need to add a reference to the <strong>MemberExport.Library dll</strong>.
Then we can create a class that implements the <strong>IValueParser</strong> interface
</p>
        <pre class="csharpcode">
          <span class="kwrd">public</span>
          <span class="kwrd">class</span> TrueFalseParser
: IValueParser { <span class="rem">/// &lt;summary&gt;</span><span class="rem">///
Returns the Datatype GUID of the true/false Render Control.</span><span class="rem">///
&lt;/summary&gt;</span><span class="kwrd">public</span> Guid DataTypeId { get { <span class="kwrd">return</span><span class="kwrd">new</span> Guid(<span class="str">"38b352c1-e9f8-4fd8-9324-9a2eab06d97a"</span>);
} } <span class="rem">/// &lt;summary&gt;</span><span class="rem">/// Converts the
0/1 to a normal yes/no string.</span><span class="rem">/// &lt;/summary&gt;</span><span class="rem">///
&lt;param name="memberfieldInfo"&gt;The memberfield info.&lt;/param&gt;</span><span class="rem">///
&lt;param name="value"&gt;The value.&lt;/param&gt;</span><span class="rem">///
&lt;returns&gt;The yes/no string&lt;/returns&gt;</span><span class="kwrd">public</span><span class="kwrd">object</span> Parse(Library.Types.MemberField
memberfieldInfo, <span class="kwrd">object</span><span class="kwrd">value</span>)
{ <span class="kwrd">return</span><span class="kwrd">string</span>.Format(<span class="str">"{0}"</span>, <span class="kwrd">value</span>)
== <span class="str">"1"</span> ? <span class="str">"yes"</span> : <span class="str">"no"</span>;
} }</pre>
        <p>
The DataTypeId property needs to return the GUID which is displayed on the datatype
edit screen. 
<br /></p>
        <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/image_2.png">
          <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/image_thumb.png" width="581" height="226" />
        </a>
        <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>
The Parse method will be called when a true/false property value is exported. In the
above example we transform the value to yes/no. 
<br />
The following information about the exported field is available in the <strong>memberFieldInfo</strong> variable:
</p>
        <ul>
          <li>
DataTypeId. The GUID which is displayed on the datatype edit screen 
</li>
          <li>
DatatypeNodeId. The node id  of the Datatype. 
</li>
          <li>
Alias. The Property alias. 
</li>
          <li>
Text. The Property text. 
</li>
        </ul>
        <p>
To use the Value Parser all we need to compile the project and add the dll to the
bin folder of the Umbraco install. Then it will be picked up automatically and values
will be exported as yes/no. In the example below the Active column is exported as
true/false value using the Value Parser.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/image_4.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/image_thumb_1.png" width="426" height="68" />
          </a>
        </p>
        <h4>
        </h4>
        <h2>Download and install
</h2>
        <p>
You can download the <a href="http://our.umbraco.org/projects/website-utilities/memberexport" target="_blank">MemberExport
package from the Umbraco Deli</a>. Just install the package, also when you want to
update your current version. When you are a Pro user make sure the license file is
still in your bin folder to unlock the Pro features. 
</p>
        <p>
Happy exporting! 
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=8a19799d-4fc8-4e67-bcb4-37907201cf57" />
      </body>
      <title>Released MemberExport 2.0</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,8a19799d-4fc8-4e67-bcb4-37907201cf57.aspx</guid>
      <link>http://www.richardsoeteman.net/2011/12/20/ReleasedMemberExport20.aspx</link>
      <pubDate>Tue, 20 Dec 2011 13:57:00 GMT</pubDate>
      <description>&lt;p&gt;
I’ve just released MemberExport 2.0. Apart from another awesome logo by &lt;a href="https://twitter.com/#!/aim24" target="_blank"&gt;Arnold
Visser&lt;/a&gt;.I’ve added some functionality as well.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/memberexport100x100_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="memberexport100x100" border="0" alt="memberexport100x100" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/memberexport100x100_thumb.png" width="104" height="104" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h2&gt;Native Excel export
&lt;/h2&gt;
&lt;p&gt;
MemberExport 1.x could only export to a csv file. This is great for most of us but
when you select a wrong separator and want to open the csv file in Excel directly
it will probably looks a bit messy like the example below. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/wrongformat_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="wrongformat" border="0" alt="wrongformat" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/wrongformat_thumb_1.png" width="1099" height="239" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;MemberExport 2.0 Pro&lt;/strong&gt; let’s you select the export option csv or Excel
file. When you select Excel file it will export the data to an Excel file instead
of csv and all the data is formatted correctly.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/image_6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/image_thumb_2.png" width="499" height="475" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h2&gt;Export provider
&lt;/h2&gt;
&lt;p&gt;
I don’t like closed systems, all of my packages are open for extension. When creating
the Excel export option I wanted the export option to be a provider model. Not only
to make this task easier for myself but also so you can use MemberExport to connect
to your custom ERP system. Implementing an export provider is pretty straight forward.
The example below is the implementation of the CSV Provider. 
&lt;/p&gt;
&lt;h2&gt;CSVProviderUI
&lt;/h2&gt;
&lt;p&gt;
The &lt;strong&gt;CSVProviderUI&lt;/strong&gt; class is the class which is responsible for the
UI part of the provider. Add a reference to the &lt;strong&gt;MemberExport.Library dll&lt;/strong&gt; and
derive from &lt;strong&gt;ExportProviderUIBase&lt;/strong&gt; class. Implement to following methods:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
OnInit, create the UI controls 
&lt;/li&gt;
&lt;li&gt;
Initialize, initialize the UI options based on the stored export provider settings.
In this case exportProvider will hold the text delimiter and text indicator options. 
&lt;/li&gt;
&lt;li&gt;
GetOptions will return the export provider settings so we use those settings when
exporting records 
&lt;/li&gt;
&lt;li&gt;
The name property will return the name of the provider stored in the Export as dropdownlist
when selecting an export provider. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System; &lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI; &lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls; &lt;span class="kwrd"&gt;using&lt;/span&gt; MemberExport.Resources.Helpers; &lt;span class="kwrd"&gt;using&lt;/span&gt; umbraco.uicontrols; &lt;span class="kwrd"&gt;namespace&lt;/span&gt; MemberExport.Library.ExportProviders.CSV
{ &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;/// Renders the Layout
for the CSV Provider&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; CSVProviderUI
: ExportProviderUIBase, INamingContainer { &lt;span class="kwrd"&gt;protected&lt;/span&gt; DropDownList
_csvTextIndicatorDropDownList = &lt;span class="kwrd"&gt;new&lt;/span&gt; DropDownList(); &lt;span class="kwrd"&gt;protected&lt;/span&gt; DropDownList
_csvSVSeperatorDropDownList = &lt;span class="kwrd"&gt;new&lt;/span&gt; DropDownList(); &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;span class="kwrd"&gt;base&lt;/span&gt;.OnInit(e); _csvSVSeperatorDropDownList.Items.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; ListItem(&lt;span class="str"&gt;&amp;quot;;&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;;&amp;quot;&lt;/span&gt;));
_csvSVSeperatorDropDownList.Items.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; ListItem(&lt;span class="str"&gt;&amp;quot;,&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;,&amp;quot;&lt;/span&gt;));
_csvTextIndicatorDropDownList.Items.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; ListItem(ResourceHelper.Current.GetStringResource(&lt;span class="str"&gt;&amp;quot;CSVNoTextIndicator&amp;quot;&lt;/span&gt;), &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;));
_csvTextIndicatorDropDownList.Items.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; ListItem(&lt;span class="str"&gt;&amp;quot;\&amp;quot;&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;\&amp;quot;&amp;quot;&lt;/span&gt;));
_csvTextIndicatorDropDownList.Items.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; ListItem(&lt;span class="str"&gt;&amp;quot;\'&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;\'&amp;quot;&lt;/span&gt;));
PropertyPanel delimiterPropery = &lt;span class="kwrd"&gt;new&lt;/span&gt; PropertyPanel(); delimiterPropery.Text
= ResourceHelper.Current.GetStringResource(&lt;span class="str"&gt;&amp;quot;CSVSeperatorProperty&amp;quot;&lt;/span&gt;);
delimiterPropery.Controls.Add(_csvSVSeperatorDropDownList); PropertyPanel stringIndicatorPropery
= &lt;span class="kwrd"&gt;new&lt;/span&gt; PropertyPanel(); stringIndicatorPropery.Text = ResourceHelper.Current.GetStringResource(&lt;span class="str"&gt;&amp;quot;CSVTextIndicatorProperty&amp;quot;&lt;/span&gt;);
stringIndicatorPropery.Controls.Add(_csvTextIndicatorDropDownList); Controls.Add(delimiterPropery);
Controls.Add(stringIndicatorPropery); } &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
Sets the export options (delimiter and string indicator).&lt;/span&gt; &lt;span class="rem"&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;exportProvider&amp;quot;&amp;gt;The
export provider.&amp;lt;/param&amp;gt;&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; Initialize(ExportProviderBase
exportProvider) { CSVProvider csvProvider = exportProvider &lt;span class="kwrd"&gt;as&lt;/span&gt; CSVProvider; &lt;span class="kwrd"&gt;if&lt;/span&gt; (csvProvider
!= &lt;span class="kwrd"&gt;null&lt;/span&gt;) { _csvSVSeperatorDropDownList.SelectedValue = csvProvider.Delimiter;
_csvTextIndicatorDropDownList.SelectedValue = csvProvider.StringIndicator; } } &lt;span class="rem"&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;/// Returns the selected export options (delimiter
and string indicator).&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
&amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; ExportProviderBase
GetOptions() { CSVProvider csvProvider = &lt;span class="kwrd"&gt;new&lt;/span&gt; CSVProvider();
csvProvider.Delimiter = _csvSVSeperatorDropDownList.SelectedValue; csvProvider.StringIndicator
= _csvTextIndicatorDropDownList.SelectedValue; &lt;span class="kwrd"&gt;return&lt;/span&gt; csvProvider;
} &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;/// Return the name
of the provider. this will be displayed in the selectbox&lt;/span&gt; &lt;span class="rem"&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;value&amp;gt;The selected name.&amp;lt;/value&amp;gt;&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; Name
{ get { &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;CSV file&amp;quot;&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;h2&gt;CsvProvider
&lt;/h2&gt;
&lt;p&gt;
The second part we need implement is the provider itself which handles the actual
export process. Create a new class and derive from &lt;strong&gt;ExportProviderBase&lt;/strong&gt;.&amp;#160;
This will give the following methods/properties:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Export, responsible for the export process 
&lt;/li&gt;
&lt;li&gt;
Icon, will be displayed when opening the saved exports tree 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In this implementation we’ve added the StringIndicator and Delimiter options, which
gets set from the UI. The export method will give a list of columns to export and
all records using an &lt;strong&gt;IRecordReader&lt;/strong&gt;.&amp;#160; The rest of the code is
implementation specific. Two important things to know when exporting records.&amp;#160;
When assigning a value always use the &lt;strong&gt;ValueParser factory&lt;/strong&gt; 
&lt;br /&gt;
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;ValueParser.Parse(reader.GetObject(column.Alias), column));&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;
To write the file to the browser either use the &lt;strong&gt;WriteResponseString&lt;/strong&gt; (for
stringvalues ) or &lt;strong&gt;WriteResponseBytes&lt;/strong&gt; (for a byte array) methods.
Both methods need the Contenttype (Mimetype) and fileExtension, in this case csv.
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System; &lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic; &lt;span class="kwrd"&gt;using&lt;/span&gt; MemberExport.Library.Csv; &lt;span class="kwrd"&gt;using&lt;/span&gt; MemberExport.Library.Members; &lt;span class="kwrd"&gt;using&lt;/span&gt; MemberExport.Library.Types; &lt;span class="kwrd"&gt;namespace&lt;/span&gt; MemberExport.Library.ExportProviders.CSV
{ &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;/// CSV (Default)
implementation of MemberExport&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; [Serializable()] &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; CSVProvider
: ExportProviderBase { &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
Exports the data to a csv file&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
&amp;lt;param name=&amp;quot;columns&amp;quot;&amp;gt;Collection of column info&amp;lt;/param&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
&amp;lt;param name=&amp;quot;reader&amp;quot;&amp;gt;The actual data to export&amp;lt;/param&amp;gt;&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; Export(List&amp;lt;Types.MemberField&amp;gt;
columns, umbraco.DataLayer.IRecordsReader reader) { &lt;span class="rem"&gt;//Use a csv
writer object&lt;/span&gt; CsvWriter writer = &lt;span class="kwrd"&gt;new&lt;/span&gt; CsvWriter(Delimiter,
StringIndicator); &lt;span class="rem"&gt;//Add columns to export&lt;/span&gt; &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (MemberField
field &lt;span class="kwrd"&gt;in&lt;/span&gt; columns) { writer.Columns.Add(field.Text); } &lt;span class="rem"&gt;//Add
data to export&lt;/span&gt; &lt;span class="kwrd"&gt;while&lt;/span&gt; (reader.Read()) { &lt;span class="rem"&gt;//Get
values for the current row&lt;/span&gt; List&amp;lt;&lt;span class="kwrd"&gt;object&lt;/span&gt;&amp;gt; values
= &lt;span class="kwrd"&gt;new&lt;/span&gt; List&amp;lt;&lt;span class="kwrd"&gt;object&lt;/span&gt;&amp;gt;(); &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (MemberField
column &lt;span class="kwrd"&gt;in&lt;/span&gt; columns) { values.Add(ValueParser.Parse(reader.GetObject(column.Alias),
column)); } &lt;span class="rem"&gt;//write values to csvwriter;&lt;/span&gt; writer.Add(values.ToArray());
} &lt;span class="rem"&gt;//Write response to the browser&lt;/span&gt; WriteResponseString(writer.Parse(), &lt;span class="str"&gt;&amp;quot;application/excel&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;csv&amp;quot;&lt;/span&gt;);
} &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;/// Gets or sets
the string indicator.&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
&amp;lt;value&amp;gt;The string indicator.&amp;lt;/value&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; StringIndicator
{ get; set; } &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;/// Gets
or sets the delimiter.&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
&amp;lt;value&amp;gt;The delimiter.&amp;lt;/value&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Delimiter
{ get; set; } &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;/// Returns
the icon that will be displayed in the saved tree&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
&amp;lt;value&amp;gt;The icon.&amp;lt;/value&amp;gt;&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; Icon
{ get { &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;csvexport.gif&amp;quot;&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;That’s all, compile and add to the bin folder of your Umbraco install and
you can use the provider!&lt;/strong&gt;
&lt;/p&gt;
&lt;h2&gt;ValueParsers
&lt;/h2&gt;
&lt;p&gt;
By default MemberExport exports the stored value from&amp;#160; the database. When this
value is an Id value you might want to export the text value instead. This can be
achieved using a value parser. By default MemberExport comes with value parsers for
the following datatypes :
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Checkbox 
&lt;/li&gt;
&lt;li&gt;
Dropdownlist 
&lt;/li&gt;
&lt;li&gt;
MNTP 
&lt;/li&gt;
&lt;li&gt;
MuiltipleDropdownlist 
&lt;/li&gt;
&lt;li&gt;
Radiobox 
&lt;/li&gt;
&lt;li&gt;
Ultimatepicker 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In the example below we will write a value parser for the True/false datatype. By
default values will be exported as 1/0. We want the values to be exported as yes/no
for this example. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;em&gt;&lt;font size="3"&gt;Before you ask, this isn’t in the core because some people
want 0/1, some true/false, some yes/no etc.&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
First we need to add a reference to the &lt;strong&gt;MemberExport.Library dll&lt;/strong&gt;.
Then we can create a class that implements the &lt;strong&gt;IValueParser&lt;/strong&gt; interface
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; TrueFalseParser
: IValueParser { &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
Returns the Datatype GUID of the true/false Render Control.&lt;/span&gt; &lt;span class="rem"&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; Guid DataTypeId { get { &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; Guid(&lt;span class="str"&gt;&amp;quot;38b352c1-e9f8-4fd8-9324-9a2eab06d97a&amp;quot;&lt;/span&gt;);
} } &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;/// Converts the
0/1 to a normal yes/no string.&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
&amp;lt;param name=&amp;quot;memberfieldInfo&amp;quot;&amp;gt;The memberfield info.&amp;lt;/param&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
&amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;The value.&amp;lt;/param&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
&amp;lt;returns&amp;gt;The yes/no string&amp;lt;/returns&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt; Parse(Library.Types.MemberField
memberfieldInfo, &lt;span class="kwrd"&gt;object&lt;/span&gt; &lt;span class="kwrd"&gt;value&lt;/span&gt;)
{ &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(&lt;span class="str"&gt;&amp;quot;{0}&amp;quot;&lt;/span&gt;, &lt;span class="kwrd"&gt;value&lt;/span&gt;)
== &lt;span class="str"&gt;&amp;quot;1&amp;quot;&lt;/span&gt; ? &lt;span class="str"&gt;&amp;quot;yes&amp;quot;&lt;/span&gt; : &lt;span class="str"&gt;&amp;quot;no&amp;quot;&lt;/span&gt;;
} }&lt;/pre&gt;
&lt;p&gt;
The DataTypeId property needs to return the GUID which is displayed on the datatype
edit screen. 
&lt;br /&gt;
&lt;/p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/image_thumb.png" width="581" height="226" /&gt;&lt;/a&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 Parse method will be called when a true/false property value is exported. In the
above example we transform the value to yes/no. 
&lt;br /&gt;
The following information about the exported field is available in the &lt;strong&gt;memberFieldInfo&lt;/strong&gt; variable:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
DataTypeId. The GUID which is displayed on the datatype edit screen 
&lt;/li&gt;
&lt;li&gt;
DatatypeNodeId. The node id&amp;#160; of the Datatype. 
&lt;/li&gt;
&lt;li&gt;
Alias. The Property alias. 
&lt;/li&gt;
&lt;li&gt;
Text. The Property text. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
To use the Value Parser all we need to compile the project and add the dll to the
bin folder of the Umbraco install. Then it will be picked up automatically and values
will be exported as yes/no. In the example below the Active column is exported as
true/false value using the Value Parser.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-MemberExport-2.0_CC61/image_thumb_1.png" width="426" height="68" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;h4&gt;
&lt;/h4&gt;
&lt;h2&gt;Download and install
&lt;/h2&gt;
&lt;p&gt;
You can download the &lt;a href="http://our.umbraco.org/projects/website-utilities/memberexport" target="_blank"&gt;MemberExport
package from the Umbraco Deli&lt;/a&gt;. Just install the package, also when you want to
update your current version. When you are a Pro user make sure the license file is
still in your bin folder to unlock the Pro features. 
&lt;/p&gt;
&lt;p&gt;
Happy exporting! 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=8a19799d-4fc8-4e67-bcb4-37907201cf57" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,8a19799d-4fc8-4e67-bcb4-37907201cf57.aspx</comments>
      <category>MemberExport</category>
      <category>Package</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=ffa08bcd-209b-4611-8d6b-cf8fc2542853</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,ffa08bcd-209b-4611-8d6b-cf8fc2542853.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,ffa08bcd-209b-4611-8d6b-cf8fc2542853.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ffa08bcd-209b-4611-8d6b-cf8fc2542853</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A question I get a lot is how to solve date formatting issues in CMSImport. Unless
you are using SQL Server all imported values are of type string. So when you try to
import date values the data layer will try to convert the value to a DateTime object,
if it can’t parse the string you will see an error. These errors can be solved. Let’s
take the following example from a Wordpress export file that can fail.
</p>
        <pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">&lt;</span>
            <span style="color: #c71585">wp</span>:<span style="color: #800000">post</span><span style="color: #ff0000">_date</span><span style="color: #0000ff">&gt;</span>2011-11-03
17:29:18<span style="color: #0000ff">&lt;/</span><span style="color: #c71585">wp</span>:<span style="color: #800000">post</span>_date<span style="color: #0000ff">&gt;</span></pre>
        </pre>
        <p>
When mapping the value in CMSImport you can select the advanced mapping option, this
will show the following mapping options if you map against a DateTime Property. As
you can see you can specify a date format. Check the <a href="http://idunno.org/archive/2004/07/14/122.aspx" target="_blank">custom
date formatting section</a> for the exact formatting syntax. When you specify a format
that exactly matches the string from your datasource(TIP use the refresh option to
update the preview) CMSImport will use that format to convert the string to the DateTime
object and all will import fine.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Solve-date-formatting-issues-during_EA1E/clip_image002_2.jpg">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Solve-date-formatting-issues-during_EA1E/clip_image002_thumb.jpg" width="594" height="206" />
          </a>
        </p>
        <p>
Hope this helps you!
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=ffa08bcd-209b-4611-8d6b-cf8fc2542853" />
      </body>
      <title>Quick tip solve date errors in CMSImport</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,ffa08bcd-209b-4611-8d6b-cf8fc2542853.aspx</guid>
      <link>http://www.richardsoeteman.net/2011/11/15/QuickTipSolveDateErrorsInCMSImport.aspx</link>
      <pubDate>Tue, 15 Nov 2011 16:05:32 GMT</pubDate>
      <description>&lt;p&gt;
A question I get a lot is how to solve date formatting issues in CMSImport. Unless
you are using SQL Server all imported values are of type string. So when you try to
import date values the data layer will try to convert the value to a DateTime object,
if it can’t parse the string you will see an error. These errors can be solved. Let’s
take the following example from a Wordpress export file that can fail.
&lt;/p&gt;
&lt;pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #c71585"&gt;wp&lt;/span&gt;:&lt;span style="color: #800000"&gt;post&lt;/span&gt;&lt;span style="color: #ff0000"&gt;_date&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;2011-11-03
17:29:18&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #c71585"&gt;wp&lt;/span&gt;:&lt;span style="color: #800000"&gt;post&lt;/span&gt;_date&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;
When mapping the value in CMSImport you can select the advanced mapping option, this
will show the following mapping options if you map against a DateTime Property. As
you can see you can specify a date format. Check the &lt;a href="http://idunno.org/archive/2004/07/14/122.aspx" target="_blank"&gt;custom
date formatting section&lt;/a&gt; for the exact formatting syntax. When you specify a format
that exactly matches the string from your datasource(TIP use the refresh option to
update the preview) CMSImport will use that format to convert the string to the DateTime
object and all will import fine.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Solve-date-formatting-issues-during_EA1E/clip_image002_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Solve-date-formatting-issues-during_EA1E/clip_image002_thumb.jpg" width="594" height="206" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Hope this helps you!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=ffa08bcd-209b-4611-8d6b-cf8fc2542853" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,ffa08bcd-209b-4611-8d6b-cf8fc2542853.aspx</comments>
      <category>CMSImport</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=6ac09de5-3047-477e-8252-73708b97fe36</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,6ac09de5-3047-477e-8252-73708b97fe36.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,6ac09de5-3047-477e-8252-73708b97fe36.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=6ac09de5-3047-477e-8252-73708b97fe36</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Last week <a href="http://twitter.com/#!/mattbrailsford" target="_blank">Matt Brailsford</a> released
uGoLive. <a href="http://our.umbraco.org/projects/backoffice-extensions/ugolive" target="_blank">uGoLive</a> is
a package with essential checks you need to do before your website goes live.Test
includes checking for debug and trace mode, removing install directory etc. The great
thing about uGoLive is that you can easily integrate checks into uGoLive. In fact
you can already use or extend the <a href="https://bitbucket.org/mattbrailsford/ugolivecontrib" target="_blank">uGoLive
contrib project</a>. But you can also integrate uGoLive into your own package. Extending
uGoLive is <a href="http://our.umbraco.org/FileDownload?id=3275" target="_blank">very
well documented</a>,  I’ve just integrated uGoLive into the SEO Analyzer package
I am working on.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Integrate-uGolive-checks-in-your-own-pac_90B0/SeoAnalyzer%20uGoLive_4.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SeoAnalyzer uGoLive" border="0" alt="SeoAnalyzer uGoLive" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Integrate-uGolive-checks-in-your-own-pac_90B0/SeoAnalyzer%20uGoLive_thumb_1.png" width="959" height="495" />
          </a>
        </p>
        <h4>
        </h4>
        <h4>It’s all about plugin architecture
</h4>
        <p>
The thing I like most about Umbraco and most of the available packages is that is
uses a plugin architecture. Plugin architecture means that Umbraco or a package defines
an interface, or attribute and when you implement that interface, or decorate your
class with the attribute in your own code it will be picked up automatically by Umbraco
or the package. This also prevents you have a tight coupling with the functionality
you want to implement. In other words when you add a class implementing a certain
interface this will be automatically picked up when the responsible functionality
in this case uGoLive exists in the Umbraco environment. If uGoLive isn’t installed
it’s just a class that does nothing.
</p>
        <p>
To integrate the custom checks as displayed in the above example I only added a reference
to the Our.Umbraco.uGoLive.dll, decorate my class with the Check attribute and implement
a class deriving from AbstractCheck for each check. 
</p>
        <pre class="csharpcode">
          <span class="rem">/// &lt;summary&gt;</span>
          <span class="rem">///
Check the SEO Analyzer table for template issues</span>
          <span class="rem">/// &lt;/summary&gt;</span> [Check(<span class="str">"C4B4D282-12CB-44AC-8263-389D70415895"</span>, <span class="str">"Template
issues"</span>, <span class="str">"Leaving SEO Issues in templates unsolved
can be bad for your ranking"</span>, <span class="str">"SEO Analyzer"</span>)] <span class="kwrd">public</span><span class="kwrd">class</span> SeoAnalyzerTemplateErrorsCheck
: AbstractCheck { <span class="rem">/// &lt;summary&gt;</span><span class="rem">///
Checks the SEO Analyzer error log table</span><span class="rem">/// &lt;/summary&gt;</span><span class="kwrd">public</span><span class="kwrd">override</span> CheckResult
Check() { <span class="kwrd">return</span> TemplateIssues.GetAll().Count == 0 ? PassedResult()
: FailedResult(); } <span class="rem">/// &lt;summary&gt;</span><span class="rem">///Returns
the result object when the check passed</span><span class="rem">/// &lt;/summary&gt;</span><span class="kwrd">private</span> CheckResult
PassedResult() { var result = <span class="kwrd">new</span> CheckResult(); result.Status
= CheckResultStatus.Passed; result.Message = <span class="str">"No template issues
found"</span>; <span class="kwrd">return</span> result; } <span class="rem">///
&lt;summary&gt;</span><span class="rem">///Returns the result object when the check
failed</span><span class="rem">/// &lt;/summary&gt;</span><span class="kwrd">private</span> CheckResult
FailedResult() { var result = <span class="kwrd">new</span> CheckResult(); result.Status
= CheckResultStatus.Failed; result.Message = <span class="str">"Template issues
found, resolve them in the SEO Analyzer section"</span>; <span class="kwrd">return</span> result;
} }</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>
This was very straight forward to implement, a big <a href="http://h5yr.com" target="_blank">#h5yr</a> to
the team who build uGoLive and now I better hurry up finishing SEO Analyzer to prevent
you from having SEO issues in your site.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=6ac09de5-3047-477e-8252-73708b97fe36" />
      </body>
      <title>Integrate your own packages into uGoLive</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,6ac09de5-3047-477e-8252-73708b97fe36.aspx</guid>
      <link>http://www.richardsoeteman.net/2011/11/08/IntegrateYourOwnPackagesIntoUGoLive.aspx</link>
      <pubDate>Tue, 08 Nov 2011 10:16:29 GMT</pubDate>
      <description>&lt;p&gt;
Last week &lt;a href="http://twitter.com/#!/mattbrailsford" target="_blank"&gt;Matt Brailsford&lt;/a&gt; released
uGoLive. &lt;a href="http://our.umbraco.org/projects/backoffice-extensions/ugolive" target="_blank"&gt;uGoLive&lt;/a&gt; is
a package with essential checks you need to do before your website goes live.Test
includes checking for debug and trace mode, removing install directory etc. The great
thing about uGoLive is that you can easily integrate checks into uGoLive. In fact
you can already use or extend the &lt;a href="https://bitbucket.org/mattbrailsford/ugolivecontrib" target="_blank"&gt;uGoLive
contrib project&lt;/a&gt;. But you can also integrate uGoLive into your own package. Extending
uGoLive is &lt;a href="http://our.umbraco.org/FileDownload?id=3275" target="_blank"&gt;very
well documented&lt;/a&gt;,&amp;#160; I’ve just integrated uGoLive into the SEO Analyzer package
I am working on.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Integrate-uGolive-checks-in-your-own-pac_90B0/SeoAnalyzer%20uGoLive_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SeoAnalyzer uGoLive" border="0" alt="SeoAnalyzer uGoLive" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Integrate-uGolive-checks-in-your-own-pac_90B0/SeoAnalyzer%20uGoLive_thumb_1.png" width="959" height="495" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h4&gt;
&lt;/h4&gt;
&lt;h4&gt;It’s all about plugin architecture
&lt;/h4&gt;
&lt;p&gt;
The thing I like most about Umbraco and most of the available packages is that is
uses a plugin architecture. Plugin architecture means that Umbraco or a package defines
an interface, or attribute and when you implement that interface, or decorate your
class with the attribute in your own code it will be picked up automatically by Umbraco
or the package. This also prevents you have a tight coupling with the functionality
you want to implement. In other words when you add a class implementing a certain
interface this will be automatically picked up when the responsible functionality
in this case uGoLive exists in the Umbraco environment. If uGoLive isn’t installed
it’s just a class that does nothing.
&lt;/p&gt;
&lt;p&gt;
To integrate the custom checks as displayed in the above example I only added a reference
to the Our.Umbraco.uGoLive.dll, decorate my class with the Check attribute and implement
a class deriving from AbstractCheck for each check. 
&lt;/p&gt;
&lt;pre class="csharpcode"&gt; &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
Check the SEO Analyzer table for template issues&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; [Check(&lt;span class="str"&gt;&amp;quot;C4B4D282-12CB-44AC-8263-389D70415895&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;Template
issues&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;Leaving SEO Issues in templates unsolved
can be bad for your ranking&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;SEO Analyzer&amp;quot;&lt;/span&gt;)] &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; SeoAnalyzerTemplateErrorsCheck
: AbstractCheck { &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
Checks the SEO Analyzer error log table&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; CheckResult
Check() { &lt;span class="kwrd"&gt;return&lt;/span&gt; TemplateIssues.GetAll().Count == 0 ? PassedResult()
: FailedResult(); } &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///Returns
the result object when the check passed&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; CheckResult
PassedResult() { var result = &lt;span class="kwrd"&gt;new&lt;/span&gt; CheckResult(); result.Status
= CheckResultStatus.Passed; result.Message = &lt;span class="str"&gt;&amp;quot;No template issues
found&amp;quot;&lt;/span&gt;; &lt;span class="kwrd"&gt;return&lt;/span&gt; result; } &lt;span class="rem"&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///Returns the result object when the check
failed&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; CheckResult
FailedResult() { var result = &lt;span class="kwrd"&gt;new&lt;/span&gt; CheckResult(); result.Status
= CheckResultStatus.Failed; result.Message = &lt;span class="str"&gt;&amp;quot;Template issues
found, resolve them in the SEO Analyzer section&amp;quot;&lt;/span&gt;; &lt;span class="kwrd"&gt;return&lt;/span&gt; result;
} }&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;
This was very straight forward to implement, a big &lt;a href="http://h5yr.com" target="_blank"&gt;#h5yr&lt;/a&gt; to
the team who build uGoLive and now I better hurry up finishing SEO Analyzer to prevent
you from having SEO issues in your site.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=6ac09de5-3047-477e-8252-73708b97fe36" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,6ac09de5-3047-477e-8252-73708b97fe36.aspx</comments>
      <category>Package</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=4d5b3cfd-4fb4-4466-bc60-9f3cf4c1f3e1</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,4d5b3cfd-4fb4-4466-bc60-9f3cf4c1f3e1.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,4d5b3cfd-4fb4-4466-bc60-9f3cf4c1f3e1.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=4d5b3cfd-4fb4-4466-bc60-9f3cf4c1f3e1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
 
</p>
        <p>
 <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/cmsimport_2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="cmsimport" border="0" alt="cmsimport" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/cmsimport_thumb.png" width="240" height="180" /></a></p>
        <p>
A few weeks back  I’ve released CMSImport 2.1. Apart from the awesome Logo made
by <a href="http://twitter.com/#!/aim24" target="_blank">Arnold Visser</a> I’ve added
some functionality as well. 
<br /></p>
        <h2>
        </h2>
        <h3>Import dashboard for Content Editors
</h3>
        <p>
CMSImport is great for developers. They can create import definitions and execute,
or schedule  them. When you want to allow your content editors uploading new
data and import that data you need to allow them access to the developer section,
or let them upload a file to a specific location and schedule a task that imports
that file very hour or so. Well not anymore. Now  you can use a dashboard control
and allow users to import their data using that dashboard control. The user can select
an import definition, upload a file containing the data to import and optional upload
a zip file containing the media files. Before importing the data will be verified
to ensure all columns still exists in the new uploaded data file. This feature is
a direct request from customers who use CMSImport to update their <a href="http://www.teacommerce.dk/" target="_blank">TeaCommerce</a> or <a href="http://www.uwebshop.com/" target="_blank">uWebshop</a> catalog,
but can also be used for any other import requirement of course.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/importdashboardcontrol_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="importdashboardcontrol" border="0" alt="importdashboardcontrol" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/importdashboardcontrol_thumb.png" width="817" height="510" />
          </a>
        </p>
        <p>
As a developer you still have full control what you want your users to import. Using
the ImportDashboard settings page you can enable/disable Import definitions you want
your end users to use. You can only select import definitions that allow upload of
a file such as Excel, Csv, Xml etc. You will also see an xml Snippet you can customize
to your needs and paste into the dashboard.config file. Using the access element you
can also restrict which User types can access the Dashboard control.<a href="http://our.umbraco.org/wiki/reference/files-and-folders/dashboardconfig" target="_blank">Check
out this wiki</a> for more information about configuring Dashboard controls.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/UserImportSettingsDashboard_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="UserImportSettingsDashboard" border="0" alt="UserImportSettingsDashboard" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/UserImportSettingsDashboard_thumb.png" width="822" height="553" />
          </a>
        </p>
        <h3>Finally support for Media using MNTP
</h3>
        <p>
With the 2.1 release it’s finally possible to upload media using the <a href="http://ucomponents.codeplex.com/wikipage?title=MultiNodeTreePicker" target="_blank">Ucomponents
Multi Node Tree Picker</a>. When you select advanced mapping options when mapping
against a property based on the MNTP datatype you will see the following options screen.
Set the media location where to store the media and files will be imported automatically.
The benefit MNTP has over normal Media pickers is that you can use a comma separated
string of media files you want to import instead of just one file. When mapping against
a MNTP datatype you can only set media settings if the datatype is configured as a
media picker, otherwise you will get a message that it is not possible to set the
advanced options.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/image_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/image_thumb.png" width="609" height="246" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=4d5b3cfd-4fb4-4466-bc60-9f3cf4c1f3e1" />
      </body>
      <title>CMSImport 2.1</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,4d5b3cfd-4fb4-4466-bc60-9f3cf4c1f3e1.aspx</guid>
      <link>http://www.richardsoeteman.net/2011/10/25/CMSImport21.aspx</link>
      <pubDate>Tue, 25 Oct 2011 12:25:49 GMT</pubDate>
      <description>&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/cmsimport_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="cmsimport" border="0" alt="cmsimport" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/cmsimport_thumb.png" width="240" height="180" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
A few weeks back&amp;#160; I’ve released CMSImport 2.1. Apart from the awesome Logo made
by &lt;a href="http://twitter.com/#!/aim24" target="_blank"&gt;Arnold Visser&lt;/a&gt; I’ve added
some functionality as well. 
&lt;br /&gt;
&lt;/p&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h3&gt;Import dashboard for Content Editors
&lt;/h3&gt;
&lt;p&gt;
CMSImport is great for developers. They can create import definitions and execute,
or schedule&amp;#160; them. When you want to allow your content editors uploading new
data and import that data you need to allow them access to the developer section,
or let them upload a file to a specific location and schedule a task that imports
that file very hour or so. Well not anymore. Now&amp;#160; you can use a dashboard control
and allow users to import their data using that dashboard control. The user can select
an import definition, upload a file containing the data to import and optional upload
a zip file containing the media files. Before importing the data will be verified
to ensure all columns still exists in the new uploaded data file. This feature is
a direct request from customers who use CMSImport to update their &lt;a href="http://www.teacommerce.dk/" target="_blank"&gt;TeaCommerce&lt;/a&gt; or &lt;a href="http://www.uwebshop.com/" target="_blank"&gt;uWebshop&lt;/a&gt; catalog,
but can also be used for any other import requirement of course.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/importdashboardcontrol_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="importdashboardcontrol" border="0" alt="importdashboardcontrol" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/importdashboardcontrol_thumb.png" width="817" height="510" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
As a developer you still have full control what you want your users to import. Using
the ImportDashboard settings page you can enable/disable Import definitions you want
your end users to use. You can only select import definitions that allow upload of
a file such as Excel, Csv, Xml etc. You will also see an xml Snippet you can customize
to your needs and paste into the dashboard.config file. Using the access element you
can also restrict which User types can access the Dashboard control.&lt;a href="http://our.umbraco.org/wiki/reference/files-and-folders/dashboardconfig" target="_blank"&gt;Check
out this wiki&lt;/a&gt; for more information about configuring Dashboard controls.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/UserImportSettingsDashboard_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="UserImportSettingsDashboard" border="0" alt="UserImportSettingsDashboard" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/UserImportSettingsDashboard_thumb.png" width="822" height="553" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h3&gt;Finally support for Media using MNTP
&lt;/h3&gt;
&lt;p&gt;
With the 2.1 release it’s finally possible to upload media using the &lt;a href="http://ucomponents.codeplex.com/wikipage?title=MultiNodeTreePicker" target="_blank"&gt;Ucomponents
Multi Node Tree Picker&lt;/a&gt;. When you select advanced mapping options when mapping
against a property based on the MNTP datatype you will see the following options screen.
Set the media location where to store the media and files will be imported automatically.
The benefit MNTP has over normal Media pickers is that you can use a comma separated
string of media files you want to import instead of just one file. When mapping against
a MNTP datatype you can only set media settings if the datatype is configured as a
media picker, otherwise you will get a message that it is not possible to set the
advanced options.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/CMSImport-2.1_E885/image_thumb.png" width="609" height="246" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=4d5b3cfd-4fb4-4466-bc60-9f3cf4c1f3e1" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,4d5b3cfd-4fb4-4466-bc60-9f3cf4c1f3e1.aspx</comments>
      <category>CMSImport</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=88a69433-9288-4b19-a85d-42cd8faaca6a</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,88a69433-9288-4b19-a85d-42cd8faaca6a.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,88a69433-9288-4b19-a85d-42cd8faaca6a.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=88a69433-9288-4b19-a85d-42cd8faaca6a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
 
</p>
        <p>
Last week I was triggered by a tweet from <a href="http://twitter.com/cultiv" target="_blank">Sebastiaan
Janssen</a> mentioning the Dictionary Section Package was broken in 4.7.1 
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/dictionarytweet_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="dictionarytweet" border="0" alt="dictionarytweet" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/dictionarytweet_thumb.png" width="531" height="86" />
          </a>
        </p>
        <p>
Moving the Dictionary to a separate section  is a technique that I use myself
a lot when building solutions for clients, I don’t want to give content editor access
to the settings section and I really don’t want to edit Dictionary items myself .I
just finished a custom section where I used this, so I immediately logged in as an
Editor and indeed I got a nice Exception. This hasn’t happened before so I assume
this security check is introduced in 4.7.x.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/userException_4.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="userException" border="0" alt="userException" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/userException_thumb_1.png" width="686" height="375" />
          </a> 
</p>
        <p>
It seemed that the page was throwing this error and indeed the constructor of EditDictionary
sets the CurrentApp which will be used  in a later stage to validate User permissions.
</p>
        <pre class="csharpcode">
          <span class="kwrd">public</span> EditDictionaryItem() { CurrentApp
= BusinessLogic.DefaultApps.settings.ToString(); }</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>
So to fix this error we only need to set the CurrentApp property to either language
or empty string (no validation at all). The easiest way is to modify the source and
recompile, but <strong>I never modify the original Umbraco source to work around the
Umbraco core</strong>. This is because you need to update the source code for every
version update of Umbraco. So I needed a way to update the CurrentApp property using
my own code. Lucky for us asp.net is an object oriented language and  so we can
add our own page and only override the constructor to modify the CurrentApp property.
This can be done by creating a custom aspx page where the codebehind class derives
from the <strong>EditDictionaryItem</strong> class.
</p>
        <pre class="csharpcode">
          <span class="rem">/// &lt;summary&gt;</span>
          <span class="rem">///
Derive from EditDictionaryItem to use the existing Dictionary functionality</span>
          <span class="rem">///
&lt;/summary&gt;</span>
          <span class="kwrd">public</span>
          <span class="kwrd">partial</span>
          <span class="kwrd">class</span> LanguageDictionary
: EditDictionaryItem { <span class="rem">/// &lt;summary&gt;</span><span class="rem">///
Use the constructor to set the current app</span><span class="rem">/// &lt;/summary&gt;</span><span class="kwrd">public</span> LanguageDictionary()
{ CurrentApp = <span class="str">"language"</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>
Unfortunately we still some page directives and markup in our aspx page. Lucky for
us the original aspx file only contains some basic markup (a placeholder), controls
are rendered from codebehind so it’s not a crime to copy and paste that markup and
update the Page Directives to use our new codebehind and inherit from LanguageDictionary
class. Below you see all markup.
</p>
        <pre class="csharpcode">
          <span class="asp">&lt;%@ Register Namespace="umbraco"
TagPrefix="umb" Assembly="umbraco" %&gt;</span>
          <span class="asp">&lt;%@
Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls"
%&gt;</span>
          <span class="asp">&lt;%@ Page Language="c#" MasterPageFile="~/umbraco/masterpages/umbracoPage.Master"
ValidateRequest="false" CodeBehind="LanguageDictionary.aspx.cs"
AutoEventWireup="True" Inherits="DictionaryFix.LanguageDictionary"
%&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">asp:Content</span>
          <span class="attr">ContentPlaceHolderID</span>
          <span class="kwrd">="body"</span>
          <span class="attr">runat</span>
          <span class="kwrd">="server"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">cc1:UmbracoPanel</span>
          <span class="attr">ID</span>
          <span class="kwrd">="Panel1"</span>
          <span class="attr">runat</span>
          <span class="kwrd">="server"</span>
          <span class="attr">Width</span>
          <span class="kwrd">="408px"</span>
          <span class="attr">Height</span>
          <span class="kwrd">="264px"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">cc1:UmbracoPanel</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">script</span>
          <span class="attr">type</span>
          <span class="kwrd">="text/javascript"</span>
          <span class="kwrd">&gt;</span> jQuery(document).ready(<span class="kwrd">function</span> ()
{ UmbClientMgr.appActions().bindSaveShortCut(); }); <span class="kwrd">&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;/</span><span class="html">asp:Content</span><span class="kwrd">&gt;</span></pre>
        <p>
So now we have a complete work around. Only thing is that this page will never be
called from the tree. So we need to have a custom tree.The class responsible for rendering
of Dictionary items tree  is the <strong>loadDictionary</strong> class. This
class contains the Method RenderJS that renders the Javascript function to open the
page. So we only need to override that method and point it to our new LanguageDictionary.aspx
file, I store the aspx file in the already existing DigibizDictionarySection folder
.
</p>
        <pre class="csharpcode">
          <span class="kwrd">public</span>
          <span class="kwrd">class</span> LanguageDictionaryTree
: loadDictionary { <span class="kwrd">public</span> LanguageDictionaryTree(<span class="kwrd">string</span> application)
: <span class="kwrd">base</span>(application) { } <span class="kwrd">public</span><span class="kwrd">override</span><span class="kwrd">void</span> RenderJS(<span class="kwrd">ref</span> StringBuilder
Javascript) { Javascript.Append( <span class="str">@" function openDictionaryItem(id)
{ UmbClientMgr.contentFrame('plugins/digibizdictionarysection/languagedictionary.aspx?id='
+ id); }"</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>
        <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>
The last thing we need to update is the database table to use our new LanguageDictionaryTree 
instead of the loadDictionary class. The database table to update is UmbracoAppTree
, search for the row containing language as appAlias and update the treeHandlerAssembly
and treeHandlerType values.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/dbupdate_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="dbupdate" border="0" alt="dbupdate" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/dbupdate_thumb.png" width="796" height="82" />
          </a>
        </p>
        <p>
Copy the aspx page to the /umbraco/plugins/DigibizDictionarySection  folder and
store the dll in the bin folder of your install. Then login as the editor again and
see that you can access Dictionary items outside of the settings section again.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/dictionaryfixed_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="dictionaryfixed" border="0" alt="dictionaryfixed" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/dictionaryfixed_thumb.png" width="899" height="435" />
          </a>
        </p>
        <p>
Below you can find the links to the original package and the fix I’ve created. <a href="http://twitter.com/#!/j_breuer" target="_blank">Jeroen
Breuer</a> mentioned he will implement this fix later in his package.
</p>
        <ul>
          <li>
            <a href="http://our.umbraco.org/projects/backoffice-extensions/digibiz-dictionary-section" target="_blank">Digibiz
Dictionary Section</a>
          </li>
          <li>
            <a href="http://www.richardsoeteman.net/downloads/DictionaryFix.rar" target="_blank">Dictionary
section fix source code</a>
          </li>
        </ul>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=88a69433-9288-4b19-a85d-42cd8faaca6a" />
      </body>
      <title>Fix user permissions error in Digibiz Dictionary Section</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,88a69433-9288-4b19-a85d-42cd8faaca6a.aspx</guid>
      <link>http://www.richardsoeteman.net/2011/10/17/FixUserPermissionsErrorInDigibizDictionarySection.aspx</link>
      <pubDate>Mon, 17 Oct 2011 11:00:49 GMT</pubDate>
      <description>&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
Last week I was triggered by a tweet from &lt;a href="http://twitter.com/cultiv" target="_blank"&gt;Sebastiaan
Janssen&lt;/a&gt; mentioning the Dictionary Section Package was broken in 4.7.1 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/dictionarytweet_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="dictionarytweet" border="0" alt="dictionarytweet" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/dictionarytweet_thumb.png" width="531" height="86" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Moving the Dictionary to a separate section&amp;#160; is a technique that I use myself
a lot when building solutions for clients, I don’t want to give content editor access
to the settings section and I really don’t want to edit Dictionary items myself .I
just finished a custom section where I used this, so I immediately logged in as an
Editor and indeed I got a nice Exception. This hasn’t happened before so I assume
this security check is introduced in 4.7.x.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/userException_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="userException" border="0" alt="userException" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/userException_thumb_1.png" width="686" height="375" /&gt;&lt;/a&gt;&amp;#160;
&lt;/p&gt;
&lt;p&gt;
It seemed that the page was throwing this error and indeed the constructor of EditDictionary
sets the CurrentApp which will be used&amp;#160; in a later stage to validate User permissions.
&lt;/p&gt;
&lt;pre class="csharpcode"&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; EditDictionaryItem() { CurrentApp
= BusinessLogic.DefaultApps.settings.ToString(); }&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;
So to fix this error we only need to set the CurrentApp property to either language
or empty string (no validation at all). The easiest way is to modify the source and
recompile, but &lt;strong&gt;I never modify the original Umbraco source to work around the
Umbraco core&lt;/strong&gt;. This is because you need to update the source code for every
version update of Umbraco. So I needed a way to update the CurrentApp property using
my own code. Lucky for us asp.net is an object oriented language and&amp;#160; so we can
add our own page and only override the constructor to modify the CurrentApp property.
This can be done by creating a custom aspx page where the codebehind class derives
from the &lt;strong&gt;EditDictionaryItem&lt;/strong&gt; class.
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;    &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
Derive from EditDictionaryItem to use the existing Dictionary functionality&lt;/span&gt; &lt;span class="rem"&gt;///
&amp;lt;/summary&amp;gt;&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; LanguageDictionary
: EditDictionaryItem { &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt; &lt;span class="rem"&gt;///
Use the constructor to set the current app&lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; LanguageDictionary()
{ CurrentApp = &lt;span class="str"&gt;&amp;quot;language&amp;quot;&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;
Unfortunately we still some page directives and markup in our aspx page. Lucky for
us the original aspx file only contains some basic markup (a placeholder), controls
are rendered from codebehind so it’s not a crime to copy and paste that markup and
update the Page Directives to use our new codebehind and inherit from LanguageDictionary
class. Below you see all markup.
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%@ Register Namespace=&amp;quot;umbraco&amp;quot;
TagPrefix=&amp;quot;umb&amp;quot; Assembly=&amp;quot;umbraco&amp;quot; %&amp;gt;&lt;/span&gt; &lt;span class="asp"&gt;&amp;lt;%@
Register TagPrefix=&amp;quot;cc1&amp;quot; Namespace=&amp;quot;umbraco.uicontrols&amp;quot; Assembly=&amp;quot;controls&amp;quot;
%&amp;gt;&lt;/span&gt; &lt;span class="asp"&gt;&amp;lt;%@ Page Language=&amp;quot;c#&amp;quot; MasterPageFile=&amp;quot;~/umbraco/masterpages/umbracoPage.Master&amp;quot;
ValidateRequest=&amp;quot;false&amp;quot; CodeBehind=&amp;quot;LanguageDictionary.aspx.cs&amp;quot;
AutoEventWireup=&amp;quot;True&amp;quot; Inherits=&amp;quot;DictionaryFix.LanguageDictionary&amp;quot;
%&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Content&lt;/span&gt; &lt;span class="attr"&gt;ContentPlaceHolderID&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;body&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;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;cc1:UmbracoPanel&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Panel1&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;Width&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;408px&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;264px&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;cc1:UmbracoPanel&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;script&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; jQuery(document).ready(&lt;span class="kwrd"&gt;function&lt;/span&gt; ()
{ UmbClientMgr.appActions().bindSaveShortCut(); }); &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&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:Content&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
So now we have a complete work around. Only thing is that this page will never be
called from the tree. So we need to have a custom tree.The class responsible for rendering
of Dictionary items tree&amp;#160; is the &lt;strong&gt;loadDictionary&lt;/strong&gt; class. This
class contains the Method RenderJS that renders the Javascript function to open the
page. So we only need to override that method and point it to our new LanguageDictionary.aspx
file, I store the aspx file in the already existing DigibizDictionarySection folder
.
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;   &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; LanguageDictionaryTree
: loadDictionary { &lt;span class="kwrd"&gt;public&lt;/span&gt; LanguageDictionaryTree(&lt;span class="kwrd"&gt;string&lt;/span&gt; application)
: &lt;span class="kwrd"&gt;base&lt;/span&gt;(application) { } &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; RenderJS(&lt;span class="kwrd"&gt;ref&lt;/span&gt; StringBuilder
Javascript) { Javascript.Append( &lt;span class="str"&gt;@&amp;quot; function openDictionaryItem(id)
{ UmbClientMgr.contentFrame('plugins/digibizdictionarysection/languagedictionary.aspx?id='
+ id); }&amp;quot;&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;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 last thing we need to update is the database table to use our new LanguageDictionaryTree&amp;#160;
instead of the loadDictionary class. The database table to update is UmbracoAppTree
, search for the row containing language as appAlias and update the treeHandlerAssembly
and treeHandlerType values.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/dbupdate_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="dbupdate" border="0" alt="dbupdate" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/dbupdate_thumb.png" width="796" height="82" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Copy the aspx page to the /umbraco/plugins/DigibizDictionarySection&amp;#160; folder and
store the dll in the bin folder of your install. Then login as the editor again and
see that you can access Dictionary items outside of the settings section again.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/dictionaryfixed_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="dictionaryfixed" border="0" alt="dictionaryfixed" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/5ed3cf28222b_A187/dictionaryfixed_thumb.png" width="899" height="435" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Below you can find the links to the original package and the fix I’ve created. &lt;a href="http://twitter.com/#!/j_breuer" target="_blank"&gt;Jeroen
Breuer&lt;/a&gt; mentioned he will implement this fix later in his package.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://our.umbraco.org/projects/backoffice-extensions/digibiz-dictionary-section" target="_blank"&gt;Digibiz
Dictionary Section&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.richardsoeteman.net/downloads/DictionaryFix.rar" target="_blank"&gt;Dictionary
section fix source code&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=88a69433-9288-4b19-a85d-42cd8faaca6a" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,88a69433-9288-4b19-a85d-42cd8faaca6a.aspx</comments>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=314dc9c3-44d2-4b36-919e-b95387116871</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,314dc9c3-44d2-4b36-919e-b95387116871.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,314dc9c3-44d2-4b36-919e-b95387116871.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=314dc9c3-44d2-4b36-919e-b95387116871</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Lots of people want to run MediaProtect on a Mysql database. Currently that is not
supported but this is only because of a failing installer script for the MySql database. <a href="http://twitter.com/benjaminhowarth" target="_blank">Benjamin
Howarth</a> wrote a MySql script for generating the log table in the MySql database.
Once this table exists all functionality will work just fine on a MySql database.
The next version of MediaProtect will support this out of the box, for now the installation
procedure will be installing MediaProtect first and then run the following script
to create the tables.
</p>
        <pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=CREATE&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">CREATE</a>
            <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=TABLE&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">TABLE</a> mediaprotectlog
( </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">LogId <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=BIGINT&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">BIGINT</a>(20) <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NOT&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NOT</a><a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NULL&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NULL</a> AUTO_INCREMENT, </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">MediaId <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=INT&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">INT</a>(11) <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NOT&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NOT</a><a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NULL&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NULL</a>, </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">Path <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=VARCHAR&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">VARCHAR</a>(500) <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NOT&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NOT</a><a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NULL&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NULL</a><a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=COLLATE&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">COLLATE</a> '<span style="color: #8b0000">utf8_general_ci</span>', </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">Protected <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=BIT&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">BIT</a>(1) <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NOT&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NOT</a><a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NULL&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NULL</a>, </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">UserName <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=VARCHAR&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">VARCHAR</a>(150) <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NOT&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NOT</a><a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NULL&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NULL</a><a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=COLLATE&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">COLLATE</a> '<span style="color: #8b0000">utf8_general_ci</span>', </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">UserIP <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=VARCHAR&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">VARCHAR</a>(50) <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NOT&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NOT</a><a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NULL&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NULL</a><a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=COLLATE&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">COLLATE</a> '<span style="color: #8b0000">utf8_general_ci</span>', </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">LogDateTime <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=DATETIME&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">DATETIME</a><a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NOT&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NOT</a><a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NULL&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NULL</a>, <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=PRIMARY&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">PRIMARY</a><a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=KEY&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">KEY</a> (LogId)
)</pre>
        </pre>
        <p>
Happy Installing!
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=314dc9c3-44d2-4b36-919e-b95387116871" />
      </body>
      <title>Run MediaProtect on MySql</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,314dc9c3-44d2-4b36-919e-b95387116871.aspx</guid>
      <link>http://www.richardsoeteman.net/2011/09/06/RunMediaProtectOnMySql.aspx</link>
      <pubDate>Tue, 06 Sep 2011 14:26:33 GMT</pubDate>
      <description>&lt;p&gt;
Lots of people want to run MediaProtect on a Mysql database. Currently that is not
supported but this is only because of a failing installer script for the MySql database. &lt;a href="http://twitter.com/benjaminhowarth" target="_blank"&gt;Benjamin
Howarth&lt;/a&gt; wrote a MySql script for generating the log table in the MySql database.
Once this table exists all functionality will work just fine on a MySql database.
The next version of MediaProtect will support this out of the box, for now the installation
procedure will be installing MediaProtect first and then run the following script
to create the tables.
&lt;/p&gt;
&lt;pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=CREATE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;CREATE&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=TABLE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;TABLE&lt;/a&gt; mediaprotectlog
( &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;LogId &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=BIGINT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;BIGINT&lt;/a&gt;(20) &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=NOT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;NOT&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=NULL&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;NULL&lt;/a&gt; AUTO_INCREMENT, &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;MediaId &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=INT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;INT&lt;/a&gt;(11) &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=NOT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;NOT&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=NULL&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;NULL&lt;/a&gt;, &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;Path &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=VARCHAR&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;VARCHAR&lt;/a&gt;(500) &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=NOT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;NOT&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=NULL&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;NULL&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=COLLATE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;COLLATE&lt;/a&gt; '&lt;span style="color: #8b0000"&gt;utf8_general_ci&lt;/span&gt;', &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;Protected &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=BIT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;BIT&lt;/a&gt;(1) &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=NOT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;NOT&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=NULL&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;NULL&lt;/a&gt;, &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;UserName &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=VARCHAR&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;VARCHAR&lt;/a&gt;(150) &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=NOT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;NOT&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=NULL&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;NULL&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=COLLATE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;COLLATE&lt;/a&gt; '&lt;span style="color: #8b0000"&gt;utf8_general_ci&lt;/span&gt;', &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;UserIP &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=VARCHAR&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;VARCHAR&lt;/a&gt;(50) &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=NOT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;NOT&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=NULL&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;NULL&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=COLLATE&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;COLLATE&lt;/a&gt; '&lt;span style="color: #8b0000"&gt;utf8_general_ci&lt;/span&gt;', &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;LogDateTime &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=DATETIME&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;DATETIME&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=NOT&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;NOT&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=NULL&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;NULL&lt;/a&gt;, &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=PRIMARY&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;PRIMARY&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=KEY&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;KEY&lt;/a&gt; (LogId)
)&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;
Happy Installing!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=314dc9c3-44d2-4b36-919e-b95387116871" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,314dc9c3-44d2-4b36-919e-b95387116871.aspx</comments>
      <category>mediaprotect</category>
      <category>Package</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=1a5e0de4-62b4-451f-ab84-7ba768395164</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,1a5e0de4-62b4-451f-ab84-7ba768395164.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,1a5e0de4-62b4-451f-ab84-7ba768395164.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=1a5e0de4-62b4-451f-ab84-7ba768395164</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A question I get asked a lot is if it is possible to assign a template based on a
datasource value. The answer is yes, normally the default assigned template will be
assigned when importing your data and this is what 99% of the users want and expect.
But using the RecordImported Event we can get the datasource value from the database
and use that alias to map the template against the imported document.
</p>
        <h3>Example
</h3>
        <p>
In this example we have some data coming from a database that we want to a standard
Runway text page. Some items such as Integer and Donec are really important and we
want to display these items in Pink. In Umbraco we added a new template called PinkTemplate
and as you can see in the image below we added that Template alias in our Datasource
that we are going to import.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Assign-a--template-using-the-event-syste_72FA/Data_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Example data" border="0" alt="Example data" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Assign-a--template-using-the-event-syste_72FA/Data_thumb.png" width="585" height="314" />
          </a>
        </p>
        <p>
As I mentioned earlier we can use the event system to manipulate the document during
import . You can use the event system for CMSImport in the same way you use the normal
Umbraco event system. In the example below you see that we derive from <a href="http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events" target="_blank">ApplicationBase</a> and
wire up the RecordImported event in the constructor. Since we only want to set the
template during the initial import, we first check if the Importaction is  ImportAsNew.
Then we need to check if the template column from the datasource is not null. You
can access all  items from the datasource  using the <strong>e.Items collection</strong>.
When the template column is not null, we get the template id from the database and
assign that value to the document.
</p>
        <div class="csharpcode">
          <pre>
            <span class="lnum"> 1: </span>
            <span class="kwrd">using</span> CMSImport.Extensions.Import;</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.businesslogic.template;</pre>
          <pre>
            <span class="lnum"> 4: </span>
            <span class="kwrd">using</span> umbraco.cms.businesslogic.web;</pre>
          <pre>
            <span class="lnum"> 5: </span> </pre>
          <pre>
            <span class="lnum"> 6: </span>
            <span class="kwrd">namespace</span> AssignTemplate</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">/// This class wil automatically
assign a template to the document when being imported for the first time using the
RecordImporting Event</span>
          </pre>
          <pre>
            <span class="lnum"> 10: </span>
            <span class="rem">/// If you want to use this
class in your own project simply rename e.Items["Template"] to the template
column you use</span>
          </pre>
          <pre>
            <span class="lnum"> 11: </span>
            <span class="rem">/// in your datasource</span>
          </pre>
          <pre>
            <span class="lnum"> 12: </span>
            <span class="rem">/// </span>
          </pre>
          <pre>
            <span class="lnum"> 13: </span>
            <span class="rem">/// This code will work in
both the Free and PRO edition of CMSImport and is written for version 1.2. </span>
          </pre>
          <pre>
            <span class="lnum"> 14: </span>
            <span class="rem">/// If you have any questions
please use the forum or email support@soetemansoftware.nl </span>
          </pre>
          <pre>
            <span class="lnum"> 15: </span>
            <span class="rem">/// &lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 16: </span>
            <span class="kwrd">public</span>
            <span class="kwrd">class</span> AssignTemplateUsingDatasource
: ApplicationBase</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">/// Initializes a new instance
of the &lt;see cref="AssignTemplateUsingDatasource"/&gt; class.</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">public</span> AssignTemplateUsingDatasource()</pre>
          <pre>
            <span class="lnum"> 22: </span> {</pre>
          <pre>
            <span class="lnum"> 23: </span>
            <span class="rem">//Whenever a records gets imported </span>
          </pre>
          <pre>
            <span class="lnum"> 24: </span> ContentImport.RecordImported += <span class="kwrd">new</span> ContentImport.RecordImportedEventHandler(ContentImport_RecordImported);</pre>
          <pre>
            <span class="lnum"> 25: </span> }</pre>
          <pre>
            <span class="lnum"> 26: </span> </pre>
          <pre>
            <span class="lnum"> 27: </span>
            <span class="rem">/// &lt;summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 28: </span>
            <span class="rem">/// When a record got imported
this event is raised.</span>
          </pre>
          <pre>
            <span class="lnum"> 29: </span>
            <span class="rem">/// &lt;/summary&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 30: </span>
            <span class="rem">/// &lt;param name="sender"&gt;The
imported document.&lt;/param&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 31: </span>
            <span class="rem">/// &lt;param name="e"&gt;The
&lt;see cref="CMSImport.Extensions.Import.RecordImportedEventArgs"/&gt;
instance containing the event data.&lt;/param&gt;</span>
          </pre>
          <pre>
            <span class="lnum"> 32: </span>
            <span class="kwrd">private</span>
            <span class="kwrd">void</span> ContentImport_RecordImported(<span class="kwrd">object</span> sender,
RecordImportedEventArgs e)</pre>
          <pre>
            <span class="lnum"> 33: </span> {</pre>
          <pre>
            <span class="lnum"> 34: </span>
            <span class="rem">//Only assign the value when
its imported for the first time</span>
          </pre>
          <pre>
            <span class="lnum"> 35: </span>
            <span class="kwrd">if</span> (e.ImportAction
== ImportActions.ImportAsNew)</pre>
          <pre>
            <span class="lnum"> 36: </span> {</pre>
          <pre>
            <span class="lnum"> 37: </span> Document doc = sender <span class="kwrd">as</span> Document;</pre>
          <pre>
            <span class="lnum"> 38: </span>
          </pre>
          <pre>
            <span class="lnum"> 39: </span>
            <span class="rem">//Get the template value from
the datasource. Datasource values are stored in the Items event arguments</span>
          </pre>
          <pre>
            <span class="lnum"> 40: </span>
            <span class="rem">//Replace templateName with
your column name in the datasource!!!</span>
          </pre>
          <pre>
            <span class="lnum"> 41: </span>
            <span class="kwrd">string</span> templateAlias
= e.Items[<span class="str">"templateName"</span>].ToString();</pre>
          <pre>
            <span class="lnum"> 42: </span> </pre>
          <pre>
            <span class="lnum"> 43: </span>
            <span class="kwrd">if</span> (doc != <span class="kwrd">null</span> &amp;&amp;
!<span class="kwrd">string</span>.IsNullOrEmpty(templateAlias))</pre>
          <pre>
            <span class="lnum"> 44: </span> {</pre>
          <pre>
            <span class="lnum"> 45: </span>
            <span class="rem">//An alias is specified, try
to get the template based on the specified alias </span>
          </pre>
          <pre>
            <span class="lnum"> 46: </span> Template template = Template.GetByAlias(templateAlias);</pre>
          <pre>
            <span class="lnum"> 47: </span>
            <span class="kwrd">if</span> (template.Id != <span class="kwrd">null</span>)</pre>
          <pre>
            <span class="lnum"> 48: </span> {</pre>
          <pre>
            <span class="lnum"> 49: </span>
            <span class="rem">//Template is found assign
it to the document</span>
          </pre>
          <pre>
            <span class="lnum"> 50: </span> doc.Template = template.Id;</pre>
          <pre>
            <span class="lnum"> 51: </span> }</pre>
          <pre>
            <span class="lnum"> 52: </span> }</pre>
          <pre>
            <span class="lnum"> 53: </span> }</pre>
          <pre>
            <span class="lnum"> 54: </span> }</pre>
          <pre>
            <span class="lnum"> 55: </span> }</pre>
          <pre>
            <span class="lnum"> 56: </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 the import is finished you see that all items are imported and when you we take
a look at the Integer document you’ll see that the assigned template is PinkTemplate
instead of the default Runway Textpage template.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Assign-a--template-using-the-event-syste_72FA/Pink%20template%20assigned_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Pink template assigned" border="0" alt="Pink template assigned" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Assign-a--template-using-the-event-syste_72FA/Pink%20template%20assigned_thumb.png" width="569" height="461" />
          </a>
        </p>
        <h3>Why isn’t this supported in the UI?
</h3>
        <p>
As I mentioned before most people expect to assign the default value. When I include
the assign template via datasource functionality in the UI it’s an option that you
need to think about before setting or ignoring the option. My idea with CMSImport
is that I want it to be a no brainer to use and introducing this option will make
it a little bit harder to use. So if you want this I think it’s better to write 10
lines of code instead.
</p>
        <h3>Downloads
</h3>
        <p>
Below you can download the complete source code. Change <strong>e.Items[“templateName”]</strong> to
the column name you want to use in your project, build the project and add the DLL
to the bin folder of your Umbraco install. That’s all!
</p>
        <p>
          <a href="http://www.richardsoeteman.net/downloads/Assign_Template.zip" target="_blank">Download
the source code here</a>
        </p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=1a5e0de4-62b4-451f-ab84-7ba768395164" />
      </body>
      <title>Assign a template based on datasource value in CMSImport</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,1a5e0de4-62b4-451f-ab84-7ba768395164.aspx</guid>
      <link>http://www.richardsoeteman.net/2011/04/29/AssignATemplateBasedOnDatasourceValueInCMSImport.aspx</link>
      <pubDate>Fri, 29 Apr 2011 12:06:57 GMT</pubDate>
      <description>&lt;p&gt;
A question I get asked a lot is if it is possible to assign a template based on a
datasource value. The answer is yes, normally the default assigned template will be
assigned when importing your data and this is what 99% of the users want and expect.
But using the RecordImported Event we can get the datasource value from the database
and use that alias to map the template against the imported document.
&lt;/p&gt;
&lt;h3&gt;Example
&lt;/h3&gt;
&lt;p&gt;
In this example we have some data coming from a database that we want to a standard
Runway text page. Some items such as Integer and Donec are really important and we
want to display these items in Pink. In Umbraco we added a new template called PinkTemplate
and as you can see in the image below we added that Template alias in our Datasource
that we are going to import.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Assign-a--template-using-the-event-syste_72FA/Data_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Example data" border="0" alt="Example data" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Assign-a--template-using-the-event-syste_72FA/Data_thumb.png" width="585" height="314" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
As I mentioned earlier we can use the event system to manipulate the document during
import . You can use the event system for CMSImport in the same way you use the normal
Umbraco event system. In the example below you see that we derive from &lt;a href="http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events" target="_blank"&gt;ApplicationBase&lt;/a&gt; and
wire up the RecordImported event in the constructor. Since we only want to set the
template during the initial import, we first check if the Importaction is&amp;#160; ImportAsNew.
Then we need to check if the template column from the datasource is not null. You
can access all&amp;#160; items from the datasource&amp;#160; using the &lt;strong&gt;e.Items collection&lt;/strong&gt;.
When the template column is not null, we get the template id from the database and
assign that value to the document.
&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; CMSImport.Extensions.Import;&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.businesslogic.template;&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.cms.businesslogic.web;&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; AssignTemplate&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;/// This class wil automatically
assign a template to the document when being imported for the first time using the
RecordImporting Event&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 10: &lt;/span&gt; &lt;span class="rem"&gt;/// If you want to use this
class in your own project simply rename e.Items[&amp;quot;Template&amp;quot;] to the template
column you use&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 11: &lt;/span&gt; &lt;span class="rem"&gt;/// in your datasource&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 12: &lt;/span&gt; &lt;span class="rem"&gt;/// &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 13: &lt;/span&gt; &lt;span class="rem"&gt;/// This code will work in
both the Free and PRO edition of CMSImport and is written for version 1.2. &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 14: &lt;/span&gt; &lt;span class="rem"&gt;/// If you have any questions
please use the forum or email support@soetemansoftware.nl &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 15: &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; 16: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; AssignTemplateUsingDatasource
: ApplicationBase&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; &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;/// Initializes a new instance
of the &amp;lt;see cref=&amp;quot;AssignTemplateUsingDatasource&amp;quot;/&amp;gt; class.&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;public&lt;/span&gt; AssignTemplateUsingDatasource()&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;//Whenever a records gets imported &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 24: &lt;/span&gt; ContentImport.RecordImported += &lt;span class="kwrd"&gt;new&lt;/span&gt; ContentImport.RecordImportedEventHandler(ContentImport_RecordImported);&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;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 27: &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; 28: &lt;/span&gt; &lt;span class="rem"&gt;/// When a record got imported
this event is raised.&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 29: &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; 30: &lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;sender&amp;quot;&amp;gt;The
imported document.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 31: &lt;/span&gt; &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;e&amp;quot;&amp;gt;The
&amp;lt;see cref=&amp;quot;CMSImport.Extensions.Import.RecordImportedEventArgs&amp;quot;/&amp;gt;
instance containing the event data.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 32: &lt;/span&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ContentImport_RecordImported(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender,
RecordImportedEventArgs e)&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;//Only assign the value when
its imported for the first time&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 35: &lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (e.ImportAction
== ImportActions.ImportAsNew)&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; Document doc = sender &lt;span class="kwrd"&gt;as&lt;/span&gt; Document;&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="rem"&gt;//Get the template value from
the datasource. Datasource values are stored in the Items event arguments&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 40: &lt;/span&gt; &lt;span class="rem"&gt;//Replace templateName with
your column name in the datasource!!!&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 41: &lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; templateAlias
= e.Items[&lt;span class="str"&gt;&amp;quot;templateName&amp;quot;&lt;/span&gt;].ToString();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 42: &lt;/span&gt;&amp;#160;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 43: &lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (doc != &lt;span class="kwrd"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;
!&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(templateAlias))&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 44: &lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 45: &lt;/span&gt; &lt;span class="rem"&gt;//An alias is specified, try
to get the template based on the specified alias &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 46: &lt;/span&gt; Template template = Template.GetByAlias(templateAlias);&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 47: &lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (template.Id != &lt;span class="kwrd"&gt;null&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;span class="rem"&gt;//Template is found assign
it to the document&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 50: &lt;/span&gt; doc.Template = template.Id;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 51: &lt;/span&gt; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt; 52: &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;/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;/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 the import is finished you see that all items are imported and when you we take
a look at the Integer document you’ll see that the assigned template is PinkTemplate
instead of the default Runway Textpage template.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Assign-a--template-using-the-event-syste_72FA/Pink%20template%20assigned_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Pink template assigned" border="0" alt="Pink template assigned" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Assign-a--template-using-the-event-syste_72FA/Pink%20template%20assigned_thumb.png" width="569" height="461" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h3&gt;Why isn’t this supported in the UI?
&lt;/h3&gt;
&lt;p&gt;
As I mentioned before most people expect to assign the default value. When I include
the assign template via datasource functionality in the UI it’s an option that you
need to think about before setting or ignoring the option. My idea with CMSImport
is that I want it to be a no brainer to use and introducing this option will make
it a little bit harder to use. So if you want this I think it’s better to write 10
lines of code instead.
&lt;/p&gt;
&lt;h3&gt;Downloads
&lt;/h3&gt;
&lt;p&gt;
Below you can download the complete source code. Change &lt;strong&gt;e.Items[“templateName”]&lt;/strong&gt; to
the column name you want to use in your project, build the project and add the DLL
to the bin folder of your Umbraco install. That’s all!
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/downloads/Assign_Template.zip" target="_blank"&gt;Download
the source code here&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=1a5e0de4-62b4-451f-ab84-7ba768395164" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,1a5e0de4-62b4-451f-ab84-7ba768395164.aspx</comments>
      <category>CMSImport</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=a534faf2-60f8-4d72-af76-7c5088c67985</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,a534faf2-60f8-4d72-af76-7c5088c67985.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,a534faf2-60f8-4d72-af76-7c5088c67985.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=a534faf2-60f8-4d72-af76-7c5088c67985</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Last month  I’ve released <a href="http://our.umbraco.org/projects/website-utilities/media-protect" target="_blank">Media
protect 1.0</a>. Mediaprotect is an Umbraco  package that helps you protect media
in the same simple way as you protect documents in Umbraco. Once the package is installed
and you protect certain media, or content nodes, the files will be password protected.
Only authenticated members can open the files, otherwise members will be redirected
to the login screen.
</p>
        <h4>
        </h4>
        <h3>
        </h3>
        <h3>The problem protecting media
</h3>
        <p>
No solution without a problem <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/wlEmoticon-winkingsmile_2.png" />.
When you use Umbraco, by default all media items can be accessed directly. If you
have a media item that you don’t want to be accessed and someone knows the url (maybe
got a link via email from a friend), or you have a link in your content  to a
media item that is crawled by Google and the user uses that url the media item will
be shown/downloaded, if you like it or not. 
</p>
        <p>
This is also the case with upload fields on a protected content node. The page is
protected but the uploaded file is not protected.
</p>
        <h3>How Media protect solves this problem
</h3>
        <p>
Once you’ve installed media protect files on protected content nodes are protected
by default and you’ll get the public access menu item on the context menu of your
media section. 
</p>
        <p>
          <strong>Best of all you don’t need to modify any existing media or document type,
it just works!</strong>
        </p>
        <p>
The public access menu item  is the same menu item you get when you want to protect
a node in the content section.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/publicaccess_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Public access" border="0" alt="Public access" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/publicaccess_thumb.png" width="335" height="285" />
          </a>
        </p>
        <p>
When you select Public access you’ll get the same dialog as you get when protecting
content. You can specify if you want to use single user or role based protection.
You can also specify the login and not authorized page. 
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/Dialog_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Dialog" border="0" alt="Dialog" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/Dialog_thumb.png" width="337" height="305" />
          </a>
        </p>
        <p>
When you are finished protecting the media item, the media item gets a No Access sign.
This indicates that the media is protected and can’t be accessed directly. When you
open the media item and click on the document link you will be redirected to the login
page since you are not logged in. Once you are logged in as a member and the member
role is assigned as allowed roles to view the media item you can download the file.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/protectedmedia_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="protectedmedia" border="0" alt="protectedmedia" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/protectedmedia_thumb.png" width="637" height="377" />
          </a>
        </p>
        <h3>Compatible with Media Pickers and default asp.net Membership provider
</h3>
        <p>
It’s nice that we can easily protect media items but we also want to make sure that
the editor doesn’t accidently pick protected files using a Media Picker, or in the
Rich Text Editor. Media Protect will also display the same No Access sign when you
want to pick a media item using a media picker or via the Rich text editor. Not only
the default Umbraco pickers but media protect is also compatible with some 3th party
pickers, such as <a href="http://ucomponents.codeplex.com/wikipage?title=MultiNodeTreePicker&amp;referringTitle=Documentation" target="_blank">Multi
Node Tree Picker</a> (The awesome picker from <a href="http://our.umbraco.org/projects/backoffice-extensions/ucomponents" target="_blank">UComponents</a>)
and the <a href="http://our.umbraco.org/projects/backoffice-extensions/digibiz-advanced-media-picker" target="_blank">DIgibiz
Advanced Media Picker</a>. Best of all if you have a custom media picker you can add
the alias of that media picker to the mediaprotect.config file and it will be picked
up automatically.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/DAMP_picker_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="DIgibiz Advanced Media Picker" border="0" alt="DIgibiz Advanced Media Picker" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/DAMP_picker_thumb.png" width="644" height="474" />
          </a>
        </p>
        <p>
Speaking about compatibility. Mediaprotect is based on the default ASP.Net Membership
provider, so you can use the default asp.net controls for logging in etc. and you
can also use your own  custom membership provider.  Media Protect comes
with a small API you can use in a .Net usercontrol/XSLT or Razor script to determine
if an item is protected, or to determine if the current logged in user has rights
to access the media node.
</p>
        <h3>Free alternatives
</h3>
        <p>
Media protect is a commercial package, it protects your media out of the box(no need
to change any document or media type , it just works).It will cost you 99 euro per
domain though. If you want to protect media without spending money you might want
to check out these free alternatives
</p>
        <ul>
          <li>
 <a href="http://our.umbraco.org/projects/backoffice-extensions/usecurefiles" target="_blank">uSecureFiles</a></li>
          <li>
            <a href="http://our.umbraco.org/projects/developer-tools/protected-media" target="_blank">Protected
Media</a>
          </li>
        </ul>
        <h3>
        </h3>
        <h3>More info and Download
</h3>
        <p>
If you want more info about Media protect I suggest you check out the <a href="http://mediaprotect.soetemansoftware.nl/" target="_blank">product
site</a>. Here you find a video demonstrating the package and <a href="http://mediaprotect.soetemansoftware.nl/documentation.aspx" target="_blank">documentation</a>.
You can also download a <a href="http://our.umbraco.org/projects/website-utilities/media-protect" target="_blank">fully
functional free trial</a> from <a href="http://our.umbraco.org/" target="_blank">our.umbraco.org</a>.
This will work on your local machine (localhost), only thing you get for free is a
nice yellow sign that says you are running in Trial mode. The trial never expires
and when you want to deploy your site you can <a href="http://mediaprotect.soetemansoftware.nl/purchase.aspx" target="_blank">buy
a license</a> for that domain or buy an enterprise license for your whole company. 
</p>
        <h3>
        </h3>
        <h3>Feedback
</h3>
Please tell me what you think about this package. Like it, hate it? I would love to
know. <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=a534faf2-60f8-4d72-af76-7c5088c67985" /></body>
      <title>Media protect 1.0</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,a534faf2-60f8-4d72-af76-7c5088c67985.aspx</guid>
      <link>http://www.richardsoeteman.net/2011/04/27/MediaProtect10.aspx</link>
      <pubDate>Wed, 27 Apr 2011 14:54:21 GMT</pubDate>
      <description>&lt;p&gt;
Last month&amp;#160; I’ve released &lt;a href="http://our.umbraco.org/projects/website-utilities/media-protect" target="_blank"&gt;Media
protect 1.0&lt;/a&gt;. Mediaprotect is an Umbraco&amp;#160; package that helps you protect media
in the same simple way as you protect documents in Umbraco. Once the package is installed
and you protect certain media, or content nodes, the files will be password protected.
Only authenticated members can open the files, otherwise members will be redirected
to the login screen.
&lt;/p&gt;
&lt;h4&gt;
&lt;/h4&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;The problem protecting media
&lt;/h3&gt;
&lt;p&gt;
No solution without a problem &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/wlEmoticon-winkingsmile_2.png" /&gt;.
When you use Umbraco, by default all media items can be accessed directly. If you
have a media item that you don’t want to be accessed and someone knows the url (maybe
got a link via email from a friend), or you have a link in your content&amp;#160; to a
media item that is crawled by Google and the user uses that url the media item will
be shown/downloaded, if you like it or not. 
&lt;/p&gt;
&lt;p&gt;
This is also the case with upload fields on a protected content node. The page is
protected but the uploaded file is not protected.
&lt;/p&gt;
&lt;h3&gt;How Media protect solves this problem
&lt;/h3&gt;
&lt;p&gt;
Once you’ve installed media protect files on protected content nodes are protected
by default and you’ll get the public access menu item on the context menu of your
media section. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Best of all you don’t need to modify any existing media or document type,
it just works!&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The public access menu item&amp;#160; is the same menu item you get when you want to protect
a node in the content section.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/publicaccess_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Public access" border="0" alt="Public access" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/publicaccess_thumb.png" width="335" height="285" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
When you select Public access you’ll get the same dialog as you get when protecting
content. You can specify if you want to use single user or role based protection.
You can also specify the login and not authorized page. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/Dialog_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Dialog" border="0" alt="Dialog" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/Dialog_thumb.png" width="337" height="305" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
When you are finished protecting the media item, the media item gets a No Access sign.
This indicates that the media is protected and can’t be accessed directly. When you
open the media item and click on the document link you will be redirected to the login
page since you are not logged in. Once you are logged in as a member and the member
role is assigned as allowed roles to view the media item you can download the file.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/protectedmedia_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="protectedmedia" border="0" alt="protectedmedia" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/protectedmedia_thumb.png" width="637" height="377" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h3&gt;Compatible with Media Pickers and default asp.net Membership provider
&lt;/h3&gt;
&lt;p&gt;
It’s nice that we can easily protect media items but we also want to make sure that
the editor doesn’t accidently pick protected files using a Media Picker, or in the
Rich Text Editor. Media Protect will also display the same No Access sign when you
want to pick a media item using a media picker or via the Rich text editor. Not only
the default Umbraco pickers but media protect is also compatible with some 3th party
pickers, such as &lt;a href="http://ucomponents.codeplex.com/wikipage?title=MultiNodeTreePicker&amp;amp;referringTitle=Documentation" target="_blank"&gt;Multi
Node Tree Picker&lt;/a&gt; (The awesome picker from &lt;a href="http://our.umbraco.org/projects/backoffice-extensions/ucomponents" target="_blank"&gt;UComponents&lt;/a&gt;)
and the &lt;a href="http://our.umbraco.org/projects/backoffice-extensions/digibiz-advanced-media-picker" target="_blank"&gt;DIgibiz
Advanced Media Picker&lt;/a&gt;. Best of all if you have a custom media picker you can add
the alias of that media picker to the mediaprotect.config file and it will be picked
up automatically.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/DAMP_picker_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="DIgibiz Advanced Media Picker" border="0" alt="DIgibiz Advanced Media Picker" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/Released-Media-protect_5F0B/DAMP_picker_thumb.png" width="644" height="474" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Speaking about compatibility. Mediaprotect is based on the default ASP.Net Membership
provider, so you can use the default asp.net controls for logging in etc. and you
can also use your own&amp;#160; custom membership provider.&amp;#160; Media Protect comes
with a small API you can use in a .Net usercontrol/XSLT or Razor script to determine
if an item is protected, or to determine if the current logged in user has rights
to access the media node.
&lt;/p&gt;
&lt;h3&gt;Free alternatives
&lt;/h3&gt;
&lt;p&gt;
Media protect is a commercial package, it protects your media out of the box(no need
to change any document or media type , it just works).It will cost you 99 euro per
domain though. If you want to protect media without spending money you might want
to check out these free alternatives
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&amp;#160;&lt;a href="http://our.umbraco.org/projects/backoffice-extensions/usecurefiles" target="_blank"&gt;uSecureFiles&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://our.umbraco.org/projects/developer-tools/protected-media" target="_blank"&gt;Protected
Media&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;More info and Download
&lt;/h3&gt;
&lt;p&gt;
If you want more info about Media protect I suggest you check out the &lt;a href="http://mediaprotect.soetemansoftware.nl/" target="_blank"&gt;product
site&lt;/a&gt;. Here you find a video demonstrating the package and &lt;a href="http://mediaprotect.soetemansoftware.nl/documentation.aspx" target="_blank"&gt;documentation&lt;/a&gt;.
You can also download a &lt;a href="http://our.umbraco.org/projects/website-utilities/media-protect" target="_blank"&gt;fully
functional free trial&lt;/a&gt; from &lt;a href="http://our.umbraco.org/" target="_blank"&gt;our.umbraco.org&lt;/a&gt;.
This will work on your local machine (localhost), only thing you get for free is a
nice yellow sign that says you are running in Trial mode. The trial never expires
and when you want to deploy your site you can &lt;a href="http://mediaprotect.soetemansoftware.nl/purchase.aspx" target="_blank"&gt;buy
a license&lt;/a&gt; for that domain or buy an enterprise license for your whole company. 
&lt;/p&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;Feedback
&lt;/h3&gt;
Please tell me what you think about this package. Like it, hate it? I would love to
know. &lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=a534faf2-60f8-4d72-af76-7c5088c67985" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,a534faf2-60f8-4d72-af76-7c5088c67985.aspx</comments>
      <category>mediaprotect</category>
      <category>Package</category>
      <category>security</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=ab9d8131-f1e1-4986-a814-edad0cab701a</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,ab9d8131-f1e1-4986-a814-edad0cab701a.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,ab9d8131-f1e1-4986-a814-edad0cab701a.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ab9d8131-f1e1-4986-a814-edad0cab701a</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Last week I’ve released CMSImport 1.2 (Pro). This was a minor release mainly to fix
a few bugs 
</p>
        <p>
          <strong>Change log:</strong>
        </p>
        <ul>
          <li>
Fixed string delimiter for csv files 
</li>
          <li>
Field adaptors on default properties didn’t get hit 
</li>
          <li>
Throw error when login is null for member import, otherwise you can’t create new members
and Umbraco will throw errors on you. 
</li>
          <li>
Introduced a new FieldAdapter that can map user logins against a Member picker data
type. CMSImport will auto convert this to the corresponding member id.</li>
          <li>
Tested against Umbraco 4.6 (beta)</li>
        </ul>
        <p>
Again this was a very small release. Mainly to fix some errors.
</p>
        <h3>CMSImport 2.0
</h3>
        <p>
The most requested feature is structured import. I’m very happy to announce 
that this will be included in CMSImport Pro 2.0. The video below demonstrates how
this will work. I've tried to keep this as simple and flexible as possible and hope
I have succeeded, if not I hope to hear from you.
</p>
        <iframe height="300" src="http://player.vimeo.com/video/18661012" frameborder="0" width="400">
        </iframe>
        <p>
          <a href="http://vimeo.com/18661012">CMSImport 2.0 Structured import demo</a> from <a href="http://vimeo.com/user1486818">Richard
Soeteman</a> on <a href="http://vimeo.com">Vimeo</a>.
</p>
        <h4>Other new functionality for 2.0
</h4>
        <p>
Of course structured import will not be the only new feature. Below you find a list
of all other functionality that will be included
</p>
        <h4>
        </h4>
        <h5>Support for more Data sources
</h5>
        <p>
CMSImport 2.0 will support new data sources to import from such as:
</p>
        <ul>
          <li>
Rss</li>
          <li>
BlogMl</li>
          <li>
Wordpress export</li>
          <li>
Excel 
</li>
          <li>
MS Acces</li>
        </ul>
        <p>
If you have a specific product, or data format you want to import from please let
me know through the comment form.
</p>
        <h5>Configurable field adapters
</h5>
        <h3>
        </h3>
        <p>
In version 1.1 I’ve introduced field adapters. These field adapters are great to convert
data from a data source to the format that is accepted by the Umbraco data type, but
sometimes you need to specify some additional information. For example when you import
data and want to map url’s against the <a href="http://ucomponents.codeplex.com/wikipage?title=UrlPicker" target="_blank">Ucomponents
Url picker</a> you want to specify if the link needs to be opened in a new window
or not. Currently that is only possible with a config file, not very friendly. In
2.0 it will be possible to specify some additional options like you have to do now
when you import related media.
</p>
        <h5>Support for third party packages
</h5>
        <p>
CMSImport 2.0 will come with support for third party packages such as <a href="http://our.umbraco.org/projects/backoffice-extensions/ucomponents" target="_blank">UComponents</a>, <a href="http://our.umbraco.org/projects/website-utilities/supersimplewebshop" target="_blank">SuperSimpleWebshop</a>,<a href="http://our.umbraco.org/projects/website-utilities/tea-commerce" target="_blank">Teacommerce</a> and <a href="http://our.umbraco.org/projects/collaboration/blog-4-umbraco" target="_blank">Blog4Umbraco</a>.
</p>
        <h5>
          <font style="font-weight: normal">I’m sure there will be extra functionality added
along the way.For now I hope you like what you’ve seen in the video and read in this
post.</font>
        </h5>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=ab9d8131-f1e1-4986-a814-edad0cab701a" />
      </body>
      <title>CMSImport 1.2 released and progress on 2.0</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,ab9d8131-f1e1-4986-a814-edad0cab701a.aspx</guid>
      <link>http://www.richardsoeteman.net/2011/01/11/CMSImport12ReleasedAndProgressOn20.aspx</link>
      <pubDate>Tue, 11 Jan 2011 13:31:15 GMT</pubDate>
      <description>&lt;p&gt;
Last week I’ve released CMSImport 1.2 (Pro). This was a minor release mainly to fix
a few bugs 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Change log:&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Fixed string delimiter for csv files 
&lt;/li&gt;
&lt;li&gt;
Field adaptors on default properties didn’t get hit 
&lt;/li&gt;
&lt;li&gt;
Throw error when login is null for member import, otherwise you can’t create new members
and Umbraco will throw errors on you. 
&lt;/li&gt;
&lt;li&gt;
Introduced a new FieldAdapter that can map user logins against a Member picker data
type. CMSImport will auto convert this to the corresponding member id.&lt;/li&gt;
&lt;li&gt;
Tested against Umbraco 4.6 (beta)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Again this was a very small release. Mainly to fix some errors.
&lt;/p&gt;
&lt;h3&gt;CMSImport 2.0
&lt;/h3&gt;
&lt;p&gt;
The most requested feature is structured import. I’m very happy to announce&amp;#160;
that this will be included in CMSImport Pro 2.0. The video below demonstrates how
this will work. I've tried to keep this as simple and flexible as possible and hope
I have succeeded, if not I hope to hear from you.
&lt;/p&gt;
&lt;iframe height="300" src="http://player.vimeo.com/video/18661012" frameborder="0" width="400"&gt;
&lt;/iframe&gt;
&lt;p&gt;
&lt;a href="http://vimeo.com/18661012"&gt;CMSImport 2.0 Structured import demo&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;h4&gt;Other new functionality for 2.0
&lt;/h4&gt;
&lt;p&gt;
Of course structured import will not be the only new feature. Below you find a list
of all other functionality that will be included
&lt;/p&gt;
&lt;h4&gt;
&lt;/h4&gt;
&lt;h5&gt;Support for more Data sources
&lt;/h5&gt;
&lt;p&gt;
CMSImport 2.0 will support new data sources to import from such as:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Rss&lt;/li&gt;
&lt;li&gt;
BlogMl&lt;/li&gt;
&lt;li&gt;
Wordpress export&lt;/li&gt;
&lt;li&gt;
Excel 
&lt;/li&gt;
&lt;li&gt;
MS Acces&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
If you have a specific product, or data format you want to import from please let
me know through the comment form.
&lt;/p&gt;
&lt;h5&gt;Configurable field adapters
&lt;/h5&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;p&gt;
In version 1.1 I’ve introduced field adapters. These field adapters are great to convert
data from a data source to the format that is accepted by the Umbraco data type, but
sometimes you need to specify some additional information. For example when you import
data and want to map url’s against the &lt;a href="http://ucomponents.codeplex.com/wikipage?title=UrlPicker" target="_blank"&gt;Ucomponents
Url picker&lt;/a&gt; you want to specify if the link needs to be opened in a new window
or not. Currently that is only possible with a config file, not very friendly. In
2.0 it will be possible to specify some additional options like you have to do now
when you import related media.
&lt;/p&gt;
&lt;h5&gt;Support for third party packages
&lt;/h5&gt;
&lt;p&gt;
CMSImport 2.0 will come with support for third party packages such as &lt;a href="http://our.umbraco.org/projects/backoffice-extensions/ucomponents" target="_blank"&gt;UComponents&lt;/a&gt;, &lt;a href="http://our.umbraco.org/projects/website-utilities/supersimplewebshop" target="_blank"&gt;SuperSimpleWebshop&lt;/a&gt;,&lt;a href="http://our.umbraco.org/projects/website-utilities/tea-commerce" target="_blank"&gt;Teacommerce&lt;/a&gt; and &lt;a href="http://our.umbraco.org/projects/collaboration/blog-4-umbraco" target="_blank"&gt;Blog4Umbraco&lt;/a&gt;.
&lt;/p&gt;
&lt;h5&gt;&lt;font style="font-weight: normal"&gt;I’m sure there will be extra functionality added
along the way.For now I hope you like what you’ve seen in the video and read in this
post.&lt;/font&gt;
&lt;/h5&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=ab9d8131-f1e1-4986-a814-edad0cab701a" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,ab9d8131-f1e1-4986-a814-edad0cab701a.aspx</comments>
      <category>CMSImport</category>
      <category>Umbraco</category>
    </item>
    <item>
      <trackback:ping>http://www.richardsoeteman.net/Trackback.aspx?guid=732157ef-452e-477f-841a-7a7f70844241</trackback:ping>
      <pingback:server>http://www.richardsoeteman.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.richardsoeteman.net/PermaLink,guid,732157ef-452e-477f-841a-7a7f70844241.aspx</pingback:target>
      <dc:creator>Richard Soeteman</dc:creator>
      <wfw:comment>http://www.richardsoeteman.net/CommentView,guid,732157ef-452e-477f-841a-7a7f70844241.aspx</wfw:comment>
      <wfw:commentRss>http://www.richardsoeteman.net/SyndicationService.asmx/GetEntryCommentsRss?guid=732157ef-452e-477f-841a-7a7f70844241</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ok official it was  released in the beginning of October, but the manual wasn’t
finished and I couldn’t upgrade existing clients to 1.1. From a customer satisfaction
point of it was very important for me to have these things ready before blogging about
all the cool new features. So what’s new?
</p>
        <h2>
        </h2>
        <h2>Media Import
</h2>
        <p>
The main feature that is added to CMSImport PRO is the ability to import media related
to content or member data. This isn’t a separate import process but integrated in
content or media import. When CMSImport finds a reference to a relative path it will
try to get the item and convert it to a media item, or store it in the media folder
in case of an upload field<b>. The only required thing is that the original media
folder is copied to the root of your Umbraco folder.</b></p>
        <p>
In the example below the img folder of the original site containing two images is
stored in the Umbraco root.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/filesystem_4.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="filesystem" border="0" alt="filesystem" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/filesystem_thumb_1.png" width="404" height="306" />
          </a>
        </p>
        <p>
In the Import wizard you can specify that you want to import media items also. Check
the option “Import content related media”. If you want to map media against media
pickers and/or the TinyMCE editor, you need to specify a media folder also. CMSImport
will keep the imported folder structure. 
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/mediaimportoptions_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="mediaimportoptions" border="0" alt="mediaimportoptions" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/mediaimportoptions_thumb.png" width="597" height="446" />
          </a>
        </p>
        <p>
Then in the next step you can create the mapping like you would normally do. 
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/mediamapping_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="mediamapping" border="0" alt="mediamapping" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/mediamapping_thumb.png" width="529" height="384" />
          </a>
        </p>
        <ol>
          <li>
When a reference to an image is found in the content, CMSImport will create a media
Item and update the image source to the new Media item(Currently only images are supported
in Rich Text. Version 1.2 will have support for files also. Media Pickers and Upload
fields will work with files also.) 
</li>
          <li>
When an image (could also be a file) reference is mapped against an upload field.
CMSImport will store the image in the Umbraco Media folder and update the reference
in the Upload field 
</li>
          <li>
When an image (could also be a file) reference is mapped against a media picker. CMSImport
will create a media item and store the Id of the media item . 
</li>
        </ol>
        <p>
When the import process is finished you’ll see that the media items are imported
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/mediaimported_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="mediaimported" border="0" alt="mediaimported" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/mediaimported_thumb.png" width="609" height="361" />
          </a>
        </p>
        <p>
And when you open an imported item in the content section you’ll see that all the
references are updated to the imported media items
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/contentupdated_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="contentupdated" border="0" alt="contentupdated" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/contentupdated_thumb.png" width="609" height="396" />
          </a>\
</p>
        <p>
Again you don’t need to do anything extra apart from downloading the original media
folder to you Umbraco Install.
</p>
        <p>
Currently this import process will work for the following datatypes:
</p>
        <ul>
          <li>
Upload Field 
</li>
          <li>
Media Picker 
</li>
          <li>
TinyMCE (Rich text editor) 
</li>
        </ul>
        <p>
In future releases CMSImport will support custom datatypes and File import for the
TinyMCE datatype also.
</p>
        <h2>FieldAdapters
</h2>
        <p>
FieldAdapters are used to convert original values from the datasource to a value the
DataType expects. In previous versions when you wanted to import boolean data from
a CSV file and map that against a true/false dataType, it would have failed because
the True/False datatype could only handle the integer values 1/0 or a real boolean. 
</p>
        <p>
          <img src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FieldAdaptersforCMSImport_D108/errors_2.png" />
        </p>
        <p>
FieldAdapters fix those issues. During import of a field CMSImport will check based
on the underlying datatype if a value can/must  be converted.
</p>
        <p>
The following snippet contains the implementation of the BooleanFieldAdapter( just
to show how little coding is needed for a better import experience).  It will
add a relation to the True/False dataType based on the DataTypeID property . This
must be the same GUID as the True/False datatype. Then in the Parse method  it
will inspect if the value is either 0 or 1, if not it will convert the value to a
real boolean.
</p>
        <pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">  1: <span style="color: #0000ff">public</span><span style="color: #0000ff">class</span> BooleanFieldAdapter
: IFieldAdapter </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">  2: {
</pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">  3:     <span style="color: #808080">///
&lt;summary&gt;</span></pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">  4:     <span style="color: #808080">///
Contains the GUID of the true/false datatype we want to parse using this FieldAdapter</span></pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">  5:     <span style="color: #808080">///
&lt;/summary&gt;</span></pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">  6:     <span style="color: #808080">///
&lt;value&gt;&lt;/value&gt;</span></pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">  7:     <span style="color: #0000ff">public</span> Guid
DataTypeId </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">  8:     {
</pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">  9:         <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>");
} </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 10:     }
</pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 11: 
</pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 12:     <span style="color: #808080">///
&lt;summary&gt;</span></pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 13:     <span style="color: #808080">///
Parse the data</span></pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 14:     <span style="color: #808080">///
&lt;/summary&gt;</span></pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 15:     <span style="color: #808080">///
&lt;param name="value"&gt;The value to parse&lt;/param&gt;</span></pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 16:     <span style="color: #808080">///
&lt;param name="fieldAdapterService"&gt;The field adapter service.&lt;/param&gt;</span></pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 17:     <span style="color: #808080">///
&lt;returns&gt;&lt;/returns&gt;</span></pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 18:     <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>,
Property property, FieldAdapterOptions fieldAdapterService) </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 19:     {
</pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 20:         <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>"))) </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 21:         {
</pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 22:             <span style="color: #008000">//
Parse boolean value and return result</span></pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 23:             <span style="color: #0000ff">bool</span> boolValue
= <span style="color: #0000ff">false</span>; </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 24:             <span style="color: #0000ff">bool</span>.TryParse(<span style="color: #0000ff">value</span>.ToString(), <span style="color: #0000ff">out</span> boolValue); </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 25:             
</pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 26:             <span style="color: #0000ff">return</span> boolValue; </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 27:             
</pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 28:         }
</pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 29:         <span style="color: #0000ff">return</span><span style="color: #0000ff">value</span>; </pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 30:     }
</pre>
          <pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 31: }</pre>
        </pre>
        <p>
This mechanism is very powerful. In fact the whole media import is based on this.
Currently it only support a few default Umbraco Datatypes. For later versions I will
make sure that FieldAdapters will fix import issues for all popular third party datatypes,
like Ucomponents also. If you don’t want to wait for that use the API to create your
own FieldAdapter and include it in your package.
</p>
        <h2>Improved API
</h2>
        <p>
In 1.0 you could extend CMSImport. but extension points existed in different assemblies.
With version 1.1 all extension points exist in the <strong>CMSImport.Extensions.DLL. </strong>Using
this assembly you can create your own DataAdapters and FieldAdapters and you can use
the event system. In <a href="http://www.cmsimport.com/download/CMSImportmanual.pdf" target="_blank">chapter
8 of the manual</a> you can read all about this. <a href="http://www.cmsimport.com/download/CMSImportVs2010Samples.zip" target="_blank">I’ve
also created a sample project</a> that you can use as a start. This contains samples
from how to create a DataType to how to support Structured Import using the Event
System. This was written for CMSImport PRO but you can use it for CMSIMport also,
although not all samples will work. The sample code uses the AdventureWorks database
a  DataSource. You can <a href="http://msftdbprodsamples.codeplex.com/" target="_blank">download
this database from  CodePlex</a> and you can download the <a href="http://www.cmsimport.com/download/CMSImportVs2010Samples.zip" target="_blank">Samples
from the CMSImport site</a>.
</p>
        <h2>
        </h2>
        <h2>
        </h2>
        <h2>Small other changes
</h2>
        <p>
This following other small changes are included in this release.
</p>
        <h4>New version of the CSV Parser
</h4>
        <p>
In the 1.0 release I was using an older version of the <a href="http://www.codeproject.com/KB/database/CsvReader.aspx" target="_blank">this
Csv Parser</a>. This one is upgraded  to the newest release an didn’t have any
issues with it.
</p>
        <h4>Better Error Handling for Saved Imports
</h4>
        <p>
When you deleted the root folder in CMSImport PRO 1.0. The only message that you would
get was “Object reference not set to an instance of an object” and you could start
all over again. In the current version CMSImport will report what is wrong and allows
you to fix those issues.
</p>
        <p>
          <a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/InvalidImportOptions_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="InvalidImportOptions" border="0" alt="InvalidImportOptions" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/InvalidImportOptions_thumb.png" width="845" height="552" />
          </a>
        </p>
        <h4>Now with documentation
</h4>
        <p>
The whole import process and API is documented now. You can <a href="http://www.cmsimport.com/documentation.aspx" target="_blank">download
the manual</a> from the CMSImport site.
</p>
        <h4>Delete failed import documents that were created during import
</h4>
        <p>
When a new document is created during the import process and the import process fails
the document will be deleted instead of left in the tree.
</p>
        <h4>Improved performance by not setting null values
</h4>
        <p>
When a value contains null it will not be mapped against the Document property. This
will save a few database calls <a href="http://www.aaron-powell.com/the-great-umbraco-api-misconception" target="_blank">according
to this blogpost</a>. This is only for new imported  documents. When a document
is being updated the null value could be the new value and therefore will be assigned
to the property.
</p>
        <h2>What’s next
</h2>
        <p>
The coming 1.2 version will include more FieldAdapters and support for third party
Datatypes. This will be included in both the Free and Pro edition of CMSImport.. I
hope to have this ready by the end of this year. I’m also working on version 2.0 that
will support structured import out of the box. This will be released early next year.
Structured Import will only be included in the PRO edition.
</p>
        <h2>
        </h2>
        <h2>Get it while its hot
</h2>
        <p>
          <a href="http://our.umbraco.org/projects/developer-tools/cmsimport" target="_blank">Download
the free version</a> from our.umbraco.org. Please vote up the package if you like
it. <a href="http://www.cmsimport.com/purchase.aspx" target="_blank">Or buy a Pro
license</a> from the CMSImport website.
</p>
        <img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=732157ef-452e-477f-841a-7a7f70844241" />
      </body>
      <title>CMSImport 1.1 (PRO) Released</title>
      <guid isPermaLink="false">http://www.richardsoeteman.net/PermaLink,guid,732157ef-452e-477f-841a-7a7f70844241.aspx</guid>
      <link>http://www.richardsoeteman.net/2010/11/24/CMSImport11PROReleased.aspx</link>
      <pubDate>Wed, 24 Nov 2010 10:37:54 GMT</pubDate>
      <description>&lt;p&gt;
Ok official it was&amp;#160; released in the beginning of October, but the manual wasn’t
finished and I couldn’t upgrade existing clients to 1.1. From a customer satisfaction
point of it was very important for me to have these things ready before blogging about
all the cool new features. So what’s new?
&lt;/p&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;Media Import
&lt;/h2&gt;
&lt;p&gt;
The main feature that is added to CMSImport PRO is the ability to import media related
to content or member data. This isn’t a separate import process but integrated in
content or media import. When CMSImport finds a reference to a relative path it will
try to get the item and convert it to a media item, or store it in the media folder
in case of an upload field&lt;b&gt;. The only required thing is that the original media
folder is copied to the root of your Umbraco folder.&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
In the example below the img folder of the original site containing two images is
stored in the Umbraco root.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/filesystem_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="filesystem" border="0" alt="filesystem" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/filesystem_thumb_1.png" width="404" height="306" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In the Import wizard you can specify that you want to import media items also. Check
the option “Import content related media”. If you want to map media against media
pickers and/or the TinyMCE editor, you need to specify a media folder also. CMSImport
will keep the imported folder structure. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/mediaimportoptions_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="mediaimportoptions" border="0" alt="mediaimportoptions" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/mediaimportoptions_thumb.png" width="597" height="446" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Then in the next step you can create the mapping like you would normally do. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/mediamapping_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="mediamapping" border="0" alt="mediamapping" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/mediamapping_thumb.png" width="529" height="384" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
When a reference to an image is found in the content, CMSImport will create a media
Item and update the image source to the new Media item(Currently only images are supported
in Rich Text. Version 1.2 will have support for files also. Media Pickers and Upload
fields will work with files also.) 
&lt;/li&gt;
&lt;li&gt;
When an image (could also be a file) reference is mapped against an upload field.
CMSImport will store the image in the Umbraco Media folder and update the reference
in the Upload field 
&lt;/li&gt;
&lt;li&gt;
When an image (could also be a file) reference is mapped against a media picker. CMSImport
will create a media item and store the Id of the media item . 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
When the import process is finished you’ll see that the media items are imported
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/mediaimported_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="mediaimported" border="0" alt="mediaimported" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/mediaimported_thumb.png" width="609" height="361" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
And when you open an imported item in the content section you’ll see that all the
references are updated to the imported media items
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/contentupdated_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="contentupdated" border="0" alt="contentupdated" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/contentupdated_thumb.png" width="609" height="396" /&gt;&lt;/a&gt;\
&lt;/p&gt;
&lt;p&gt;
Again you don’t need to do anything extra apart from downloading the original media
folder to you Umbraco Install.
&lt;/p&gt;
&lt;p&gt;
Currently this import process will work for the following datatypes:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Upload Field 
&lt;/li&gt;
&lt;li&gt;
Media Picker 
&lt;/li&gt;
&lt;li&gt;
TinyMCE (Rich text editor) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In future releases CMSImport will support custom datatypes and File import for the
TinyMCE datatype also.
&lt;/p&gt;
&lt;h2&gt;FieldAdapters
&lt;/h2&gt;
&lt;p&gt;
FieldAdapters are used to convert original values from the datasource to a value the
DataType expects. In previous versions when you wanted to import boolean data from
a CSV file and map that against a true/false dataType, it would have failed because
the True/False datatype could only handle the integer values 1/0 or a real boolean. 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.richardsoeteman.net/content/binary/WindowsLiveWriter/FieldAdaptersforCMSImport_D108/errors_2.png" /&gt;
&lt;/p&gt;
&lt;p&gt;
FieldAdapters fix those issues. During import of a field CMSImport will check based
on the underlying datatype if a value can/must&amp;#160; be converted.
&lt;/p&gt;
&lt;p&gt;
The following snippet contains the implementation of the BooleanFieldAdapter( just
to show how little coding is needed for a better import experience).&amp;#160; It will
add a relation to the True/False dataType based on the DataTypeID property . This
must be the same GUID as the True/False datatype. Then in the Parse method&amp;#160; it
will inspect if the value is either 0 or 1, if not it will convert the value to a
real boolean.
&lt;/p&gt;
&lt;pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  1: &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; BooleanFieldAdapter
: IFieldAdapter &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  2: {
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  3:     &lt;span style="color: #808080"&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  4:     &lt;span style="color: #808080"&gt;///
Contains the GUID of the true/false datatype we want to parse using this FieldAdapter&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  5:     &lt;span style="color: #808080"&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  6:     &lt;span style="color: #808080"&gt;///
&amp;lt;value&amp;gt;&amp;lt;/value&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  7:     &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Guid
DataTypeId &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  8:     {
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;  9:         &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;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 10:     }
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 11: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 12:     &lt;span style="color: #808080"&gt;///
&amp;lt;summary&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 13:     &lt;span style="color: #808080"&gt;///
Parse the data&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 14:     &lt;span style="color: #808080"&gt;///
&amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 15:     &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;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 16:     &lt;span style="color: #808080"&gt;///
&amp;lt;param name=&amp;quot;fieldAdapterService&amp;quot;&amp;gt;The field adapter service.&amp;lt;/param&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 17:     &lt;span style="color: #808080"&gt;///
&amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 18:     &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;,
Property property, FieldAdapterOptions fieldAdapterService) &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 19:     {
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 20:         &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;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 21:         {
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 22:             &lt;span style="color: #008000"&gt;//
Parse boolean value and return result&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 23:             &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; boolValue
= &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 24:             &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;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 25:             
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 26:             &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; boolValue; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 27:             
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 28:         }
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 29:         &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 30:     }
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; 31: }&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;
This mechanism is very powerful. In fact the whole media import is based on this.
Currently it only support a few default Umbraco Datatypes. For later versions I will
make sure that FieldAdapters will fix import issues for all popular third party datatypes,
like Ucomponents also. If you don’t want to wait for that use the API to create your
own FieldAdapter and include it in your package.
&lt;/p&gt;
&lt;h2&gt;Improved API
&lt;/h2&gt;
&lt;p&gt;
In 1.0 you could extend CMSImport. but extension points existed in different assemblies.
With version 1.1 all extension points exist in the &lt;strong&gt;CMSImport.Extensions.DLL. &lt;/strong&gt;Using
this assembly you can create your own DataAdapters and FieldAdapters and you can use
the event system. In &lt;a href="http://www.cmsimport.com/download/CMSImportmanual.pdf" target="_blank"&gt;chapter
8 of the manual&lt;/a&gt; you can read all about this. &lt;a href="http://www.cmsimport.com/download/CMSImportVs2010Samples.zip" target="_blank"&gt;I’ve
also created a sample project&lt;/a&gt; that you can use as a start. This contains samples
from how to create a DataType to how to support Structured Import using the Event
System. This was written for CMSImport PRO but you can use it for CMSIMport also,
although not all samples will work. The sample code uses the AdventureWorks database
a&amp;#160; DataSource. You can &lt;a href="http://msftdbprodsamples.codeplex.com/" target="_blank"&gt;download
this database from&amp;#160; CodePlex&lt;/a&gt; and you can download the &lt;a href="http://www.cmsimport.com/download/CMSImportVs2010Samples.zip" target="_blank"&gt;Samples
from the CMSImport site&lt;/a&gt;.
&lt;/p&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;Small other changes
&lt;/h2&gt;
&lt;p&gt;
This following other small changes are included in this release.
&lt;/p&gt;
&lt;h4&gt;New version of the CSV Parser
&lt;/h4&gt;
&lt;p&gt;
In the 1.0 release I was using an older version of the &lt;a href="http://www.codeproject.com/KB/database/CsvReader.aspx" target="_blank"&gt;this
Csv Parser&lt;/a&gt;. This one is upgraded&amp;#160; to the newest release an didn’t have any
issues with it.
&lt;/p&gt;
&lt;h4&gt;Better Error Handling for Saved Imports
&lt;/h4&gt;
&lt;p&gt;
When you deleted the root folder in CMSImport PRO 1.0. The only message that you would
get was “Object reference not set to an instance of an object” and you could start
all over again. In the current version CMSImport will report what is wrong and allows
you to fix those issues.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/InvalidImportOptions_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="InvalidImportOptions" border="0" alt="InvalidImportOptions" src="http://www.richardsoeteman.net/content/binary/Windows-Live-Writer/b32d988aa488_E602/InvalidImportOptions_thumb.png" width="845" height="552" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h4&gt;Now with documentation
&lt;/h4&gt;
&lt;p&gt;
The whole import process and API is documented now. You can &lt;a href="http://www.cmsimport.com/documentation.aspx" target="_blank"&gt;download
the manual&lt;/a&gt; from the CMSImport site.
&lt;/p&gt;
&lt;h4&gt;Delete failed import documents that were created during import
&lt;/h4&gt;
&lt;p&gt;
When a new document is created during the import process and the import process fails
the document will be deleted instead of left in the tree.
&lt;/p&gt;
&lt;h4&gt;Improved performance by not setting null values
&lt;/h4&gt;
&lt;p&gt;
When a value contains null it will not be mapped against the Document property. This
will save a few database calls &lt;a href="http://www.aaron-powell.com/the-great-umbraco-api-misconception" target="_blank"&gt;according
to this blogpost&lt;/a&gt;. This is only for new imported&amp;#160; documents. When a document
is being updated the null value could be the new value and therefore will be assigned
to the property.
&lt;/p&gt;
&lt;h2&gt;What’s next
&lt;/h2&gt;
&lt;p&gt;
The coming 1.2 version will include more FieldAdapters and support for third party
Datatypes. This will be included in both the Free and Pro edition of CMSImport.. I
hope to have this ready by the end of this year. I’m also working on version 2.0 that
will support structured import out of the box. This will be released early next year.
Structured Import will only be included in the PRO edition.
&lt;/p&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;Get it while its hot
&lt;/h2&gt;
&lt;p&gt;
&lt;a href="http://our.umbraco.org/projects/developer-tools/cmsimport" target="_blank"&gt;Download
the free version&lt;/a&gt; from our.umbraco.org. Please vote up the package if you like
it. &lt;a href="http://www.cmsimport.com/purchase.aspx" target="_blank"&gt;Or buy a Pro
license&lt;/a&gt; from the CMSImport website.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.richardsoeteman.net/aggbug.ashx?id=732157ef-452e-477f-841a-7a7f70844241" /&gt;</description>
      <comments>http://www.richardsoeteman.net/CommentView,guid,732157ef-452e-477f-841a-7a7f70844241.aspx</comments>
      <category>CMSImport</category>
      <category>Umbraco</category>
    </item>
    <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>Richard Soeteman</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;h1&gt;This post is deprecated
&lt;/h1&gt;
&lt;p&gt;
Check out documentation on http://www.cmsimport.com/documentation.aspx instead
&lt;/p&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>3</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>