INFO: Version 15.xModule type:

CSV import - Edit template

A template for the CSV import opens via a special editor (wizard for the CSV import). Here you can assign the desired placeholders to the available metadata and object fields, which are replaced by the values in the CSV file during import.

CSV import: Edit template
CSV import: Edit template

Operation

The template for the CSV import with the editable fields for the metadata and object data is displayed in the draft. Fields that are to be filled with values from the CSV file are filled with a placeholder according to the scheme [!--column name--] matching the desired column (e.g. [!--surname--] for column name surname).

'Object type':

This field shows you the object type of the page and can be changed if required.
(e.g. eventMulti for event dates, news for news objects, etc.).

'Metadata':

In this area, you can fill in the fields with placeholders for the metadata, which should receive the corresponding value from the CSV file.

'Object data':

In this area, the existing object data fields in the template are displayed in tabular form.

  • "ID" column
    These fields map the wd:data tags with the corresponding id.
    The value can also be changed, which is particularly useful for added object data.
    The value must not contain any special characters, umlauts or spaces.
  • Placeholder" column
    These fields can be filled with a pre-entered value and/or the desired placeholder. The placeholder always corresponds to the string of the table header (e.g. [!--title--] for a column that is defined with the string "title".
    The following additional notations are possible:
    • [!--WERT.createCategoryNodes()--]
      e.g. [!--categories.createCategoryNodes()--] for reading category values for the "categories" column.
    • [!--WERT.disableOutputEscaping()--]
      e.g. [!--descriptionFurther.disableOutputEscaping()--] for reading formatted text for the "descriptionFurther" column.
  • Function buttons column (copy / delete)
    In this column, an existing row can be deleted using the recycle bin symbol and a new row can be copied using the copy symbol. Be sure to adjust the ID after copying in order to have a unique ID for each field!

Below you will find an example of a CSV file that can be used to import event dates, for example.
Several categories are separated by commas.

Beispiel: CSV-Datei für den Import von Veranstaltungsterminen

title;description;keywords;organizer;locationCategoryID;categoryID;dateFrom;dateTo;text
Örtlicher Volkslauf;Lauf durch die Innenstadt von Bremburg;bremburg, stadt, lauf;Lauftreff e.V.;815208815208;647503647503,791891794891;2020-07-28 08:30:00;2020-07-28 12:30:00;Ein Lauf für die ganze Stadtbevölkerung. Jung und alt ist dazu eingeladen und trifft sich um 8:00 Uhr am Stadtbrunnen.
Bremburger Sommerferienspaß;Aktionen für Kinder und Jugendliche während der Sommerferien;bremburg, sommerferien, 2018;Stadt Bremburg;815208815208;647503647503,654832654832;2020-07-27 08:00:00;2020-09-07 12:00:00;Auch im Jahr 2018 bietet die Stadt Bremburg den Kindern und Jugendlichen wieder zahlreiche Aktionen und Aktivitäten während der Sommerferien an.