A RolandD Cyber Produksi Product
This is a step by step instruction on how to import templates using CSVI SOBI.
Templates are pre-defined settings that CSVI SOBI uses to import or export data. This allows for consistency and not having to choose the settings every time an import or export is done.
The templates can be found by taking the following route: Components → CSVI SOBI → Templates
There are a number of template settings that can be imported. A complete list is available from the available fields page or the available fields per type page.
Each template setting has an equivalent on the available fields page. For example “Template name” is called template_name.
Templates are identified by template name. The template name is needed by CSVI SOBI to know which template is being imported.
To create the import file this example will use the spreadsheet program Calc by OpenOffice.org because it is very flexible with delimiters.
The first row will contain the column headers. Column headers tell the program what is going to be imported and are essentially the supported fields. Earlier in this tutorial the fields that can be used are already mentioned.
The first row will look like this
| template_name | template_type | use_column_headers | show_preview |
|---|
Now CSVI SOBI knows what is going to be imported.
This row will contain the first real data to be imported. CSVI SOBI works from the idea that if an entry already exists it is updated, otherwise created.
| template_name | template_type | use_column_headers | show_preview |
|---|---|---|---|
| My entries | EntriesImport | Y | Y |
More rows can be added as many as there is a need for. The file can eventually look like this:
| template_name | template_type | use_column_headers | show_preview |
|---|---|---|---|
| My entries | EntriesImport | Y | Y |
| My fields | FieldsImport | Y | N |
| My field details | FieldDetailsImport | N | N |
After all fields have been added, the file can be saved as a CSV file.
In Calc, click on File → Save as. In the dropdown box Save as type select Text CSV (.csv) and check the box before Edit filter settings. Give the file a name, for example templateimport.csv and click on Save.
First a warning will appear which can be ignored by clicking Yes. Now a dialog box appears asking what delimiters to use. These values should be different than the delimiters used in the templates that are going to be imported otherwise the layout is incorrect. The recommended values are:
Click on OK and the file is saved.
To import the file there first needs to be a template created with settings to be used during import.
In the Joomla back-end click on Components → CSVI SOBI → Templates. The list of available templates will be shown. In a clean installation some sample templates will be shown. Select the 05. Template Import template and click on Edit.
The template wizard will now show up. All options have already been set. Click on General Settings to verify the same delimiters are set as used for the saved file. After all has been verified, click on Save. At the template list click on CSVI SOBI.
From the control panel, click on Import. On the import screen, first choose the template to use for import. Select here 05. Template Import.
The file to import can either be uploaded or read from the local file system. Click on Browse to select the file that was saved earlier.
Click on Import.
A preview of the import will be shown first if this option is enabled in the template settings. On the preview page click on Import to continue importing the file.
A result screen is now shown with the results of the import. At the bottom some debug information is printed. This is also an option in the template settings and is usually only used for troubleshooting.
If there were no problems during the import, the templates are now shown in the Template List in CSVI SOBI when clicking on Components → CSVI SOBI → Templates.
This concludes the tutorial on how to import templates.