<?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 - CMSImport</title>
    <link>http://www.richardsoeteman.net/</link>
    <description />
    <language>en-us</language>
    <copyright>Richard Soeteman</copyright>
    <lastBuildDate>Tue, 15 Nov 2011 16:05:32 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=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=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=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=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=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=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>
  </channel>
</rss>