Home
CMSImport PRO User manual
Contents
1. 2010 Soeteman Software page 14 39 CMSImport PRO User manual Version 1 1 CMSimport PRO 1 1 ld gt Select Datasource lect XMI Fi select XMI File Select a local file Specify a url http www cmsimport com userdata xmi Xpath Expression fi user Previous Next When using xml you can only use elements attributes are not supported at the moment All elements that you want to map later must be under the first child node of the xml document 4 4 Select member type and role In this step you can select the member type and assign one or more roles With the When the item already exists option you specify what to do when an item is already imported Possible options are skip and overwrite When the Automatic generate password option is checked a password is automatically generated for the imported member When the Send credentials via mail is checked an email with login credentials is send to the imported member You can edit the email template check chapter settings on how to do this CMSimport PRO 1 1 4 aA gt Select Member type and roles Member type Company EN Automatic assign role Ki s H Customer V Company When member exists Update record EN Automatic generate Si password Send credentials via mail Import content related media ane Su Previous Next 2010 Soeteman Software page 15 39 CMSImport PRO User manual 4 5 Create Mapping In this step y
2. Previous Next The following datasource types are supported by default e Sql Server e CSV File e XML File It is possible to create extra Datasource Types See chapter extend CMSImport for more information 4 3 Select Datasource In the select Datasource step you need to provide the information for the selected datasource type 2010 Soeteman Software page 13 39 CMSImport PRO User manual Version 1 1 4 3 1 SQL Server In case of SQL server you need to provide the Connection string and the query that you want to use to retrieve the data CeSimpoert PRO 1 1 id Select Datasource Enter a Connection String XPRESS database AdventureWorksL en m SELECT FROM SalesLT Customer Enter your Query Previous Next 4 3 2 CSV File In case of a CSV file you need to select a CSV file You also need to provide the field separator and Text Indicator A field separator is the character that is used to separate the columns The text indicator is a character that indicates a text string The default settings are based on an export from Microsoft Excel CM Simport PRO 1 4 Select Datasource The csv file must contain unique headers ee ees Select a local file CrUsersirichard Dest Specify a url Field Seperator D Text Indicator No seperator Le Previous Next 4 3 3 XML File In case of an XML file you need to select the xml File Optional you can specify an xpath expression
3. CMSimport PRO 1 1 hi Create Mapping Generic Properties Name Titie e Publish t ignore E Unpublish at gnore ei Create Date Ignore EN Update date ignore Le Document property Database column Body Description E imageUpload image EN Media Image k Previous Next 2010 Soeteman Software page 10 39 CMSImport PRO User manual Version 1 1 Quick tip When your fieldnames from the datasource are the same as the alias of the document property CMSImport will automatically map this field 3 6 Confirm In this step you can validate the selected options one more time When you click next the import will start C klroceg FAD ii id Confirm Piemme validate your input and press Next to import the data DataSource Type Darasource Data command Data Op zons Document location Bocument Type Autopubl uh Content update options Action when the them already exists Primary key Related media op oms import related m dia Medias locetion Lol Sereer servers SOLEXPRES databases estiete eae i eee qe Denn 2 Select from TestDate Import Impit Trim Update record ld Tru Jepcet Database colur nowdeHame Tite tiile Tgle both Cai ar ig Ener image Wind oad Image media Image Pret besi 3 7 Import When you click next in this step the import starts When the import is finished it will report what it did If there were any errors it will also report the errors 2010 Soeteman Software
4. With CMSImport it s possible to run imports for on a certain day time When you right click ona saved import item content member and click schedule the following screen will show up CMSimport PRO 1 1 Saved import name CMSIimport manual Scheduled task name Daily import records for CMSlmport manual Notify emailadress manual cmsimport com Run task as Administrator Le Execute every Week A Day Hour Monday Tuesday Wednesday Thursday Friday Saturday C Sun day Time o l 0 hel You can schedule imports to run every week on certain days time every day on a certain time or every hour You can specify an email address to receive a notification when the import is finished and you can specify a user that will be assigned as creator for imported documents members When you click save the item will run on the selected day time 2010 Soeteman Software page 23 39 CMSImport PRO User manual d A CMSImport i Import data d di Saved imports d A Content CMSimport manual A Members a di Scheduled imports p A Weekly a A Daily Se Daily import records for CMSImport manual K A Hourly gt di Settings Version 1 1 When the import is finished you will receive a notification email on the specified email address 2010 Soeteman Software page 24 39 CMSImport PRO User manual Version 1 1 7 Settings Here you can modify the following settings 7 1 Login credential settings The
5. true try using SqlConnection sglConnection new SglConnection DataSource sqlConnection Open SglCommand sqlCommand new SqlCommand DataCommand sqlConnection sqlCommand ExecuteReader catch Exception ex Cannot validate against the Datasource result false Set the ValidationErrorMessage with the correct error ValidationErrorMessage string Format Error validating the Data source ex Message return result 8 4 6 GetData The GetData method gets called by CMSImport during the import process and it will return the data from DataSource as an IDataReader In the example below you ll see the GetData Method that we are using in the AdventureWorks ProductCategory DataAdapter public override IDataReader GetData SqlConnection sqlConnection new SglConnection DataSource sqlConnection Open SglCommand sqlCommand new SqlCommand DataCommand sqlConnection return sqlCommand ExecuteReader CMSImport will dispose the Reader once it s finished with the import If you need to convert XML to IDataReader you can use the helper method XmIToDataReader which takes an xml file url and xpath Expression Currently this only works on elements attributes will be ignored 2010 Soeteman Software page 30 39 CMSImport PRO User manual Version 1 1 8 4 7 End result When we will build the dll and drop it into the bin folder of the Umbraco install we will see the AdventureWorks
6. wew cmsinport com for more information Binary files in the package Read more instal Package intemmet Bevetigde modus uitgeschaketd Make sure that the installer has modify rights on the following folders e bin e config e umbraco The installer also needs rights to create tables in the database If for some reason you can t give the installer these rights you can install the package manually Read the chapter manual configuration how to do this Once the package is installed you have an extra folder in your developer section called CMSImport You might need a page refresh or even logout and in again to see this folder 2010 Soeteman Software page 5 39 CMSImport PRO User manual 3 Import Content Version 1 1 You can start CMSImport by right clicking on the content node and select the import data option only visible for administrators Comtant bk Content Bech w La a Pi E A Runway Homepage A lmiport Create Edt in Canvas Delete wove Copy Sort Rollback Publish Manage hostnames Permissions Pubic accasa At Trail Notifications Send To Tran iation Reload nodes import Data Welcomes Administrator Or you can go to the developer section open CMSImport and select Start Import The following wizard will open 3 1 Introduction When the wizard starts it will start with an introduction CMSimport PRO 1 1 id intro
7. A Hydration Packs gt Lights gt di Locks gt A Panniers gt A Purnps gt A Tires and Tubes gt A Bikes 8 7 Using a FieldAdapter to map text values against a Dropdownlist DataType As you might have seen our Product DocumentType contains a property ProductColor which is based on the ProductColor Dropdownlist When we map the color column form the AdventureWorks Products table directly against the ProductColor document property the import will fail because it can t convert text to integer values 2010 Soeteman Software page 33 39 CMSImport PRO User manual Version 1 1 Import Finished import is finished Import duration h m s 00 00 39 Records retrieved 295 Records imported 50 Errors 245 The following errors occured Conversion failed when converting the nvarchar value Multi to data type int Conversion failed when converting the nvarchar value Silver to data type int Conversion failed when converting the nvarchar value Blue to data type int Conversion failed when converting the nvarchar value Blue to data type int Conversion failed when converting the nvarchar value Blue to data type int Conversion failed when converting the nvarchar value Silver to data type int Conversion failed when converting the nvarchar value Silver to data type int Conversion failed when converting the nvarchar value Black to data type int Conversion failed when converting the nvarchar value Black to data type int Conversion fail
8. o Config o Handlers o Pages o Usercontrols Inthe umbraco plugins CMSImport Usercontrols folder create the folder ImportSteps Inthe umbraco plugins CMSImport Usercontrols ImportSteps folder create the folder Contentimport Inthe umbraco plugins CMSImport Usercontrols ImportSteps folder create the folder MemberImport Copy all config and license files from the zip file to the folder umbraco plugins CMSImport Config Copy all ashx files from the zip file to the folder umbraco plugins CMSImport Handlers Copy all aspx files from the zip file to the folder umbraco plugins CMSImport Pages Copy the files CMSImport ascx and CMSImportinstaller ascx from the zip file to the folder umbraco plugins CMSImport Usercontrols Copy the files ConfirmSelectedOptions ascx Importing ascx Intro ascx MapProperties ascx SelectDataSource ascx SelectDataSourceType ascx from the zip file to the folder umbraco plugins CMSImport Usercontrols ImportSteps Copy SelectUmbracoTypeAndLocation ascx from the zip file to the folder umbraco plugins CMSImport Usercontrols ImportSteps Contentimport Copy SelectMembertype ascx from the zip file to the folder umbraco plugins CMSImport Usercontrols ImportSteps Memberlmport Copy all the png files from the zip file to the folder umbraco Images 9 2 Manual configuration of Database Run the following script to install the database tables 2010 Soeteman Software page 36 39 CMSImpo
9. otherwise perform a manual installation see chapter94 10 2 I don t see my column names when importing from a CSV file Make sure that your csv file contains column names 10 3 I get weird column names when importing from a CSV file Make sure that you set the correct csv options to display the CSV file For example choose as the delimiter and as a string indicator 10 4 can t import attributes when importing from an xml file Currently only elements are supported 10 5 Email is not send when importing a member Make sure you have configured your smtp server in your web config file Also check the UmbracoLog table for SMTP errors 10 6 I get an Invalid License exception Make sure you ve bought the correct license for the sub domain or an enterprise license Contact support soetemansoftware nl for help 2010 Soeteman Software page 39 39
10. public MaintainProductCategoryStructure ContentImport RecordImported new ContentImport RecordImportedEventHandler ContentImport_RecordImported void ContentImport_RecordImported object sender RecordimportedEventArgs e Document doc sender as Document Only execute when the document and parent not is null and the dataAdapter is AdventureWorks ProductCategories if doc null amp amp e DataAdapter AdventureWorks ProductCategories amp amp e Items ParentProductCategoryID null Use the Content Document target ContentRelation GetRelatedDocument e DataAdapter e DataKeyName e Items ParentProductCategoryID if target null 2010 Soeteman Software page 32 39 CMSImport PRO User manual Version 1 1 doc Move target Id We can use the same mechanism to import products into their related Product Category The following snippet will retrieve the ProductCategory document See that it s using the ProductCategories dataTypeAlias and ProductCategoryID to determine the original data Document productCategory ContentRelation GetRelatedDocument AdventureWorks ProductCategories ProductCategoryID e Items ProductCategoryID When the import is finished the end result would look like the image below o ko Products d di Accessories a Bike Racks EI 4 Bike Stands EI a A Bottles and Cages EI Kc Kc 4 A Cleaners EI d A Fenders a4 a A Helmets 4 4 gt
11. ProductCategory in the pulldown list of possible datasources and when we select the AdventureWorks ProductCategory DataAdapter we will see the following screen CMSimport PRO 1 1 Select Datasource Enter the connection string Previous Next We can provide a Connection string and click next to continue the import process the normal way 8 5 Create a DataAdapter for Products Since we will be importing both Categories and Products we want to have a Custom DataAdapter for products also Do this by copying the ProductCategories DataAdapter and name it AdventureWorksProducts rename the alias to AdventureWorks Products and replace the query in the UpdateAdapter method to SELECT FROM SalesLT Product order by Name 8 6 Using events to maintain structure Now that we have our DataAdapters ready we can use them to import the data But when we take a closer look at the ProductCategory data we see that it uses the ParentProductCategoryID column to maintain the structure ProductCategoryID ParentProductCategorylID Name 1 4 NULL Accessories A Ge 3 A NULL Clothing 4 2 NULL Components 5 5 1 Mountain Bikes 6 6 1 Road Bikes f Fi Touring Bikes D Ga Dataran Deal mta It would be nice to keep the structure during import Events make that possible Once a record is imported the Recordimported event is fired This will pass the document as sender and ImportedEventArguments The RecordlmportedEventArgume
12. can be downloaded from http www cmsimport com download CMSImportVs2010Samples zip To use the samples you need to install the AdventureWorks Lite database which can be downloaded from the CodePlex site http msftdbprodsamples codeplex com and use CMSlmport PRO although some samples might work in the free version 8 1 Setting up Visual Studio When you want to create an extension for CMSImport you can create a new Class Library and add a reference to the Assembly CMSImport Extensions When you need to use Umbraco functionality or want to use CMSImport events also you can create references to the assemblies Umbraco interfaces cms and businesslogic 8 2 What s in CMSImport extensions 8 2 1 DataAdapter A DataAdapter is used as a generic interface to talk to datasources You can use a DataAdapter by using ImportDataAdapter as a base class Checkout the samples for a full implementation of a DataAdapter 8 2 2 FieldAdapter A FieldAdapter could be used to convert original data in a datasource to a datatype specific format during import CMSImport uses this already to make sure values like true false will be converted to a Boolean value which could be mapped against a true false datatype without causing an error and it uses FieldAdapters to import media A FieldAdapter is basically an implementation of the IFieldAdapter interface which contains the DataAdapterld property and the Parse method The DataAdapterlD must match wit
13. ne EE EE 29 8 4 2 elle AY r EE 29 8 4 3 POON ER 29 8 4 4 Update DataAdapier E 29 8 4 5 V AIG EEN 30 8 4 6 EUR WEE 30 8 4 7 PNG EE 31 8 5 Create a DataAdapter for Producte 31 8 62 USING eventsto REENEN 31 8 7 Using a FieldAdapter to map text values against a Dropdownlist DataType 0000000000000 33 9 MANUAL INSTALLATION CONFIGURATION ccsseccssscccsscccsseccssecccsscccsscccsseccseceusesenesess 36 9 1 Manual installation Of nes 36 9 2 Manual configuration Of Database e 36 9 3 Manual configuration of the language les 37 9 4 Manual configuration of the scheduled task handler ccccccccseceeceeeeeeeeeseeeeeseeeeesaeeeeeaes 38 10 TROUBLESHOOTING ee 39 10 1 I don t see the CMSImport package in my developer sechon 39 10 2 I don t see my column names when importing from a CSV file ec cccccceecceeeeeeeeeeeeeeeees 39 10 3 get weird column names when importing from a CSV fil ccccseeeeeeeeeeeeeeaeeeeesseeeeeneees 39 10 4 I can t import attributes when importing from an xml file 20 0 0 cece ceeeeceeeeceeeeseeeeeeeesaeeesaees 39 10 5 Email is not send when importing a member 39 10 6 get an Invalid License exception cccccsescecceeseeeceesececceeseeecsuseeecsauseeeseseeessaneeessageeessenes 39 2010 Soeteman Software page 3 39 CMSImport PRO User manual Version 1 1 1 Introduction CMSImport PRO helps you import content or members from any datasource int
14. original data You can cancel the import for this record by setting the cancel property to true 8 2 3 2 Recordimported The Recordimported event gets hit after a record got imported the sender object contains the imported document or member RecordimportedEventArgs contains the following information e DataAdapter e DataKeyName Primary key column e DataKeyValue Primary key value e ImportAction ImportAsNew update or skip record e Items collection of items that contains the original data 8 2 3 3 Importing The Importing event gets hit before the import starts ImportEventArgs contains the alias of the DataAdapter 2010 Soeteman Software page 27 39 CMSImport PRO User manual Version 1 1 8 2 3 4 Imported The Imported event gets hit after the import has finished ImportEventArgs contains the alias of the DataAdapter 8 3 Samples When vou ve downloaded and installed the samples you can use two extra document types in your Umbraco installation ProductCategory and Product Before you start make sure the ProductColor datatype uses the integer Database datatype Edit datatype ProductColor H Name ProductCoor Render control Dropdown list ei Data Type GUID afd4ea9c9 feld 4d2a bct6 73c6206ch5da Add prevalue All samples will use the above mentioned document types Only thing you need to do is to create a root folder and use that folder as import location for all the samples Wal Giese Con
15. page 11 39 CMSImport PRO User manual a Import Finished Import is finished import duration m s 00 00 00 Records retrieved i Records imported 2 Errors 0 Previous Quick tip Version 1 1 In case of test imports it might be useful to install the Content Maintenance Dashboard package also to bulk publish unpublish and delete content nodes You can download the package via http our umbraco org projects developer tools content maintenance dashboard package 3 8 Save Import steps When you click save you can specify a name and when hitting the save button again the import steps are saved for later use CPiSimport PRO 1 1 TE Save the import steps for later reference Save import steps as CMSI impart manual Saved imports can be found in the tree 4 di CMSImport S Import data d A Saved imports d A Content CMSimport manual A Members d di Scheduled imports 2010 Soeteman Software page 12 39 CMSImport PRO User manual Version 1 1 4 Import members 4 1 Introduction When the wizard starts it will start with an introduction CMSimport PRO 1 1 4 m Intro This wizard will help you to import your existing data into Umbraco Next 4 2 Select Datasource Type In this step you are asked to specify a datasource type and how the data should be imported content members CMSimport PRO 1 1 4 i F Select Datasource Type Datasource type Scl Server e Import Data as
16. settings are based on an export from Microsoft Excel CMSimport PRO 1 1 4 l Select Datasource The csv file must contain unique headers VR Select CSV File Select a local file Specify a url http umbracov4 local data testdata csv Field Seperator Le Text Indicator No seperator D No seperator Previous Next 3 3 3 XML File In case of an XML file you need to select the xml file Optional you can specify an xpath expression 2010 Soeteman Software page 8 39 CMSImport PRO User manual Version 1 1 CMSimport PRO 1 1 D Select Datasource SOTE AAM PI Select a local file C Users richard Des Bladeren Specify a url Xpath Expression importData contentType news Se Det When using xml you can only use elements attributes are not supported at the moment All elements that you want to map later must be under the first child node of the xml document 3 4 Select destination and document type In this step you need to specify the location where you want to store the imported documents This is prefilled if you started the import from the context menu in content You can also specify the document type and you select the auto publish checkbox when checked items are published automatically Import content related media will import any reference that CMSImport can find as a media item and update the source data with a reference to the media item See chapter Related media import fo
17. CMSImport PRO User manual Version 1 1 CMSImport PRO User manual 1 2 3 INTRODUCTION E INSTALEA TION HE IMPORT e el AU VE 3 1 IIL OGU CHON EE 32 select DataSource Tye iia ee ee es es 33 DELS CT CAT AS OUR Eegiel 3 3 1 Eege 3 3 2 GSW E Sidi WT 3 4 Select destination and document type nsnssnnesennensenensrnnnesrnennennenne 3 5 LGreatemappmg 3 6 COn EE 3 7 Ia le ei GE 338 SAVE ENEE Eeer EE IMPORT MEMBERS iiec eoa a e tees 4 1 Je deel Ree EE 4 2 Select DataSource Tvpe AS e RE e e 4 3 1 1 BES p 2 aan Rete Elle 4 3 2 OV EE 4 3 3 XME EE 4 4 Select member type and role AS Create WAP DING EE 4 6 CONT BEE 4 7 Juge EE E ele WE RE SCHEDULE HMR GR Tieden eege eege SETTINGS E 7 1 Beieleit E In ue E 7 2 Scheduler result settings ccccccsssccccccesseeceeeceeseeeeeeeeeseeeeeeeeeseeeeseeas EXTEND CIVISIMIPOR geet Ee 8 1 Setting UP VISUAL StU GO ere a ee 8 2 WhatemChM Slmport evtensionsg naannnannnennnnnnnnennnenennnnnnnnronnennnnnne 8 2 1 LACUS occas ota wee het aha i tat edie a 8 2 2 FElJAGID WEE 8 2 3 SE 8 2 3 1 FCCONGIMDOMING EE E MECOMMMPOMEO EE 92 93 INMOONING e E enee EE 2010 Soeteman Software Version 1 1 page 2 39 CMSImport PRO User manual Version 1 1 E mm EE 28 8 4 Create a DataAdapter for Product Categories ccccceccccccssecceeeeseceeceeeeeeseesecesseeeeeseaeeeeeas 28 8 4 1 Greate AS 2 f penne
18. This wizard will help you to import your existing data into Umbraco Next 2010 Soeteman Software page 6 39 CMSImport PRO User manual Version 1 1 3 2 Select Datasource Type In this step you are asked to specify a datasource type and how the data should be imported content members CMSimport PRO 1 1 4 al F Select Datasource Type Datasource type Sal Server e Import Data as Content e Previous Next The following datasource types are supported by default e Sql Server e CSV File e XML File It is possible to create extra datasource types See chapter extend CMSImport for more information 3 3 Select datasource In the select datasource step you need to provide the information for the selected datasource Type 3 3 1 SQL Server In case of SQL server you need to provide the Connection string and the query that you want to use to retrieve the data 2010 Soeteman Software page 7 39 CMSImport PRO User manual CMSimport PRO 1 al Select Datasource Enter a Connection Strine XPRESS database TestData user id Select from TestData Enter your Query Previous Next 3 3 2 CSV File Version 1 1 SS password d Be SR In case of a CSV file you need to select a CSV File You also need to provide the field separator and text indicator A field separator is the character that is used to separate the columns The text indicator is a character that indicates a text string The default
19. ed when converting the nvarchar value Black to data type int Conversion failed when converting the nvarchar value Black to data type int Conversion failed when converting the nvarchar value Black to data type int farwearrinn failad whan eoanwertina tha marsrhar walia Rlack ta data hamna int This can be solved using a FieldAdapter For our implementation we want to retrieve the Id of the prevalue and return that id instead of the text value Additional it would also be nice if we can create the prevalue when it doesn t exists so we don t need to create the prevalues first Below you find the FieldAdapter The DataTypeld returns the Guid of the Dropdown Datatype The parse method first checks if the datatype is the ProductColor datatype and when it is the ProductColor datatype it will get or create the integer id of the prevalue lt summary gt public class AutoAddProductColorToList IFieldAdapter d lt summary gt Gets the data type id lt summary gt lt value gt The data type id lt value gt public Guid DataTypeld get return new Guid a74ea9c9 8e18 4d2a 8cf6 73c6206c5da6 public object Parse object value umbraco cms businesslogic property Property property FieldAdapterOptions fieldAdapterOptions if property PropertyType DataTypeDefinition Text ProductColor DataTypeDefinition dt property PropertyType DataTypeDefinition value GetOrCreatePrevalue dt Id value ToSt
20. h the DataAdapterControl This will ensure that the parse method gets called when data is imported for the Color property Render control 4 Data Type GUID Database datatype integer e Add prevalue This Parse method accepts the following parameters 2010 Soeteman Software page 26 39 CMSImport PRO User manual Version 1 1 Value The original value which we can manipulate Document property Gives us information about the document type FieldAdapterOptions Bunch of general setting mostly related to Media Import 8 2 3 Events There are several events that you can use for both content and member import You can hook up events in the same way you hook up events for other Umbraco functionality by deriving from ApplicationBase and hook up the event in the constructor public class Sample umbraco BusinessLogic ApplicationBase public Sample Hook up event MemberImport RecordImporting new MemberImport RecordImportingEventHandler MemberImport_RecordImporting void MemberImport_RecordImporting object sender RecordimportingEventArgs ei Logic here 8 2 3 1 Recordimporting The recordimporting event gets hit before a record got imported the sender object contains the document or member being imported RecordimportingEventArgs contains the following information e DataAdapter e DataKeyName Primary key column e DataKeyValue Primary key value e Items collection of items that contains the
21. nts contains a hashtable called Items This hastable contains a readonly reference to the orginal data So even we did not map the ParentProductCatagorylD column we can still get the parent ID This comes handy because CMSImport adds relations between the original imported data and Umbraco documents Internally it uses this to determine if a record needs to be imported ad new or updated You can retrieve this information yourself by using the helper method ContentRelation GetRelatedDocument This method accepts the following parameters 2010 Soeteman Software page 31 39 CMSImport PRO User manual Version 1 1 DataAdapter alias Primary key column The primary key For product categories data we can use the current DataAdapter alias and Primary key We only need the original primary key which is ParentProductCategorylD Based on this information the parent document will be returned and we can move the imported document to its parent As you can see in the image below a A Products a Ai Accessories Bike Racks Bike Stands Bottles and Cages Cleaners Fenders Helmets Hydration Packs Lights Locks Panniers Humps KKK KK KKK KK Tires and Tubes gt J Bikes gt Clothing gt D Components Below you ll find the complete source code for this event public class MaintainProductCategoryStructure ApplicationBase lt summary gt Hook up the RecordImporting event so it gets hit during import lt summary gt
22. o Umbraco The following datasources are supported by default eSQL Server CSV file eXML file With CMSImport PRO it s possible to import media related to content or members also When media is imported references in content or member data will be updated automatically With CMSImport PRO it is possible to save the import steps for later use and schedule saved imports for a certain date and time 2010 Soeteman Software page 4 39 CMSImport PRO User manual 2 Installation Version 1 1 Install the CMSIimport PRO package using the Umbraco package installer w Favorieten 15 Develope Umbreco CMS manusllocal Dei veie A Developer Dy Cache Browser A Data Types de Macros H A Packages E Umbraco package Repostory Name Author More info License AD Crested packages A Installed packages 5 Runway modules amp install local package 3 Pagmae Bevg omg e Lane we om Om L rer D gn span installing the package Crraimport PRO 1 1 RRC 4 1 Casimport PRO 1 1 Version 1 1 0 Soeteman Software http www cmsimport com CMSiaport license Scripting Files Jk KAT Files Accept license Read me d Accept license CMSimport helps you import content or members from any datasource into Umbraco The fofiowing datasources are supported by defauit SOL Server SY fille You can atso create your own custom OetaAdapter This is the Commercial PRO version of CMSimport check out http
23. ou can specify the mapping between the fields from the data source and the properties of the Umbraco member type CMSimport PRO 1 1 a i Create Mapping Generic Properties Member name Member login Member email Document property Telephone CompanyName EmailAddress EmailAddress Database colu Phone Previous Next Quick tip sl sl sl mn el Version 1 1 When your fieldnames from the datasource are the same as the alias of the document property CMSImport will automatically map this field 4 6 Confirm In this step you can validate the selected options one more time When you click next the import will Start 2010 Soeteman Software page 16 39 CMSImport PRO User manual CMSimport PRO 1 1 Confirm Please validate your input and press Next to import the data DataSource Type Sql Server Datasource server SQLEXPRESS database AdventureWorksLT user id UmbracoCMS password UmbracolCMs Data command SELECT FROM SalesLT Customer Data Options Member type Company Selected Roles Customer Company Action when Update record member exists Automatic generate True password Send member False credentials via mail Mapping Document property Database column name CompanyName login EmailAddress email EmailAddress telephone Phone Version 1 1 Previous Next 4 7 Import When you click next in this step the import starts When the import is finished i
24. r more information The When the item already exists and the primary key option are needed for content updates With the When the item already exists option you specify what to do when an item is already imported Possible options are skip and overwrite With the primary key you specify the key in the datasource This field will be used to determine if an item is already imported To disable content updates uncheck the Enable content updates option Only do this when you don t have a primary key in your datasource No relation between imported data and Umbraco document is stored so even when you run the import for the second time data will be imported as new records 2010 Soeteman Software page 9 39 CMSImport PRO User manual Version 1 1 CMSimport PRO 1 1 ld Select Destination and DocumentType Location Import Delete Choose Document Twpe Import Auto publish Import content related media Make sure all folders containing the media are stored in the root of this umbraco environment Read the manual for a detailed description Media location Import Delete Choose Enable content updates Only uncheck this option when you don t have a primary key in your datasource When the record already exists Update record D Select primary key in datasource P E 3 5 Create mapping In this step you can specify the mapping between the fields from the data source and the properties of the Umbraco document type
25. ring return value 2010 Soeteman Software page 34 39 CMSImport PRO User manual Version 1 1 Once the import has finished using this FieldAdapter you ll see that all options are added to the ProductColor datatype Edit datatype ProductColor Name ProductCotor Render control Dropdown list Le Data Type GUID af4ea9c9 BelB 4d2a 8ct6 3c6206c5da6 T edu gn mmm k tC Line Text Value Multi 286 Delete Siver 287 Delete Blue 288 Delete Black 289 Delete Silver Black 290 Delete Red 291 Delete Yellow ENG Delete White 293 Delete brey 294 Delete Add prevalue And you ll see that these Prevalues are mapped correctly against the document Product Properties HAA ProductName Road 150 Red 52 Product Number BK R93R 52 ProductPrice 3578 2700 Product color 2010 Soeteman Software page 35 39 CMSImport PRO User manual Version 1 1 9 Manual Installation Configuration If you renamed the Umbraco folder or for some reason can t give the installer sufficient rights to create tables in the database or the sufficient rights to modify the following folders bin config umbraco you need to install CMSlmport PRO Manually 9 1 Manual installation of files Open de folder in the zip file Copy all dll files to the bin folder of your Umbraco installation Open the umbraco plugins folder Create the folder CMSImport Create the following folders in the umbraco plugins CMSImport folder
26. rt PRO User manual Version 1 1 9 3 Manual configuration of the language files When the install failed due insufficient rights of the installer It s better to assign sufficient rights to the umbraco config lang folder and all the xml files in that folder Then start CMSImport PRO again CMSImport Pro will determine that the language file is not updated and will automatically update the language files again If for some reason this isn t the case you can modify the files manually To do this open the necessary language files For example if you use the English language in Umbraco open en xml if you use the Dutch language in Umbraco open nl xml etc 2010 Soeteman Software page 37 39 CMSImport PRO User manual Version 1 1 Replace With 9 4 Manual configuration of the scheduled task handler Open the config umbracoSettings config file Replace With And replace url to mysite umbraco with the url of your site including the umbraco path For example http cmsimport com umbraco plugins CMSImport Handlers ScheduleTaskHandler ashx When the scheduled task handler is configured correctly and you browse to that url using your favorite browser it should report CMSImport scheduler 2010 Soeteman Software page 38 39 CMSImport PRO User manual Version 1 1 10 Troubleshooting 10 1 I don t see the CMSImport package in my developer section Make sure you have sufficient rights to install the package See chapter 2
27. se settings will be used when an email with login credentials is send to an imported member You can specify The from email address The email subject The email body In the email body you can use the following placeholders that will be replaced with real values when sending the email Snippet Description loginname The loginname of the imported member password The password NOT ENCRYPTED of the imported member Hemail The Email address of the imported member property alias This will replace the property alias with the imported value 7 2 Scheduler result settings These settings will be used when an email is send to inform a user that a scheduled task is finished You can specify The from email address The email subject The email body In the email body you can use the following placeholders that will be replaced with real values when sending the email Snippet Description Taskname The name of the scheduled task Duration The duration of the import process RecordCount The amount of records in the datasource 2010 Soeteman Software page 25 39 CMSImport PRO User manual Version 1 1 8 Extend CMSIimport Although you don t need to there are several ways to extend CMSImport This chapter describes how you can make use of these extension points in your code All samples can be downloaded from http www cmsimport com download cmsimportsamplepackage zip and a sample VS2010 solution
28. t 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 2010 Soeteman Software page 19 39 CMSImport PRO User manual i Select Destination and DocumentType Location Document Type Auto pubiish import content related megdia Media location Enable content updates When the record Already exists Swiect primary key In datasource Then in the next step you can create the mapping like you would normally do CMSimport PRO 1 1 id Create Mapping Generic Properties Name Publish at Unpublish at Create Date Update date Tite o ignore x ignore EN Sec P ee Database column Tithe Description EK Image EN 2 image EE 2010 Soeteman Software Version 1 1 page 20 39 CMSImport PRO User manual Version 1 1 1 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 2 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 3 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 When the impor
29. t process is finished you ll see that the media items are imported wi Craan eh Haip GO Logosi Adminstrator THF Contents Properties A Media T a Ak Import 4 img Contents Za logos Za scitrebel CH 3 e m 4 Recych in 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 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 2010 Soeteman Software page 21 39 CMSImport PRO User manual Content Content Properties Content i ty Him MN Ai Shy et A Runway Homepage a es an as am eng a A Import A Fete 1 A Fete A Lorem ipsum dolor sit amet consectetuer adipiscing elit Aenean commode ligula 1 a Recycle Bin eget dolor Aenean massa Cum sechs nategue a Age penatibus et magnis dis parturiant montes nascatur ridiculus mus Donec quam telis alt ImageUpload pectos Remove file Coster Mecha Laer ez A Media xsltrebel Delete Choose Deeelrcgee Wernher Currently this import process will work for the following datatypes Upload field Media Picker TinyMCE Images only Version 1 1 In future releases CMSImport will support custom datatypes and File import for the TinyMCE datatype also 2010 Soeteman Software page 22 39 CMSImport PRO User manual Version 1 1 6 Schedule Imports
30. t will report what it did If there were any errors it will also report the errors CMSimport PRO 1 1 4 i Import Finished Import is finished Import duration 00 01 29 h m s Records retrieved 440 Records imported 440 Errors 0 Previous 2010 Soeteman Software page 17 39 CMSImport PRO User manual Version 1 1 4 8 Save Import steps When you click save you can specify a name and when hitting the save button again the import steps are saved for later use CMSimport PRO 1 1 12 JM Save the import steps for later reference Save import steps as Customers 2010 Soeteman Software page 18 39 CMSImport PRO User manual Version 1 1 5 Related media import CMSImport can import media also 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 The only required thing is that the original media folder is copied to the root of your Umbraco folder In the example below the img folder of the original site containing two images is stored in the Umbraco root manual local di App Browser A App Code A App Data Ak bin d config Ak install A masterpages A media d python d scripts A umbraco A umbraco_chent A usercontrols bk xst In the Import wizard you can specify that you want to impor
31. ted override void OnInit EventArgs e base OnInit e _contentPanel ID CategorycontentPanel _contentPanel CssClass propertypane Labels _selectDataSourceLiteral ID SelectDataSourceLiteral _selectDataSourceLiteral Text Enter the connection string TextBox _datasourceTextBox ID datasource _datasourceTextBox CssClass umbEditorTextField _datasourceTextBox Text DataSource Create Layout _contentPanel Controls Add _selectDataSourceLiteral _contentPanel Controls Add new LiteralControl amp nbsp amp nbsp _contentPanel Controls Add _datasourceTextBox Controls Add _contentPanel1 8 4 4 Update DataAdapter values When the user clicks next you need to update the DataAdapter properties in this case DataSource and DataCommand public override void UpdateAdapter Uses the SqlConnection from the TextBox as the Datasource DataSource _datasourceTextBox Text 2010 Soeteman Software page 29 39 CMSImport PRO User manual Version 1 1 We are creating a custom DataAdapter for a productCategories don t bother the user with sql DataCommand Select from SalesLT ProductCategory order by ParentProductCategoryID Name 8 4 5 Validate When the user clicks next the validate method is called after the DataAdapter values are updated Return true in this method when the DataSource is valid false when not valid public override bool Validate bool result
32. tent Site Content Properties A Content je KH A V A Runway Homepage AN ProductIlmport Site Name Productimport Recycle Bin Site Description Just a placeholder 8 4 Create a DataAdapter for Product Categories A DataAdapter could be used to communicate with a DataSource Basically it lets you set some properties and returns data to CMSImport which can then be imported In the Sample project we are using two DataAdapters 1 ProductCategoryAdapter responsible for importing all product category data 2 ProductDataAdapter responsible for importing all product data 2010 Soeteman Software page 28 39 CMSImport PRO User manual Version 1 1 8 4 1 Create the class To create a custom DataAdapter you need to create a class that derives from CMSImport Extensions DataAdapter ImportDataAdapter public class AdventureWorksLTProductCategeoriesDataAdapter ImportDataAdapter 8 4 2 Specify an alias The alias you specify by overriding the Alias property will be shown in the pulldownlist where the user can pick a DataAdapter This alias must be unique public override string Alias get return AdventureWorks ProductCategories 8 4 3 Add Ul The ImportAdapter class itself derives from the Webcontrol Class so we can directly add UI Controls to this class private Panel _contentPanel new Panel private TextBox _datasourceTextBox new TextBox private Literal _selectDataSourceLiteral new Literal protec
Download Pdf Manuals
Related Search
Related Contents
Russell Hobbs MAX-I-SWANN SW-U-WC202P User's Manual PC-Based Exercise Stress ECG User Manual NEC MultiSync® LCD2190UXi 21" black 岩田交流センター 磐田市匂坂上615 Dell PowerEdge R815 Getting Started Guide I.R.I.S. IRISNotes Express 2 Avaya Bay Command Console User's Manual Desa VDDVF36STN/STP User's Manual Copyright © All rights reserved.
Failed to retrieve file