Ordermanager/views/twig/admin/export-templates/CSV-Vorlage.html.twig

45 lines
1.6 KiB
Twig
Raw Normal View History

2024-01-22 14:06:08 +01:00
{% set sEnclosure = '"' %}
{% set sLineSeparator = "@new_line@" %}
{% set sFieldSeparator = "," %}
{# ** special chars ************** #}
{# new line => "@new_line@" #}
{# tab => "@tab@" #}
{# white space => "@space@" #}
{# ******************************* #}
{% autoescape false %}
{% if contentType == 'header' %}
{% block d3ordermanager_exporttemplate_csv_header %}
{% if aFieldList %}
{% for key, sFieldName in aFieldList %}
{% block d3ordermanager_exporttemplate_csv_headfieldname %}
{{ sEnclosure }}{{ sFieldName }}{{ sEnclosure }}
{% endblock %}
{% if loop.last == false %}
{{ sFieldSeparator }}
{% else %}
{{ sLineSeparator }}
{% endif %}
{% endfor %}
{% endif %}
{% endblock %}
{% endif %}
{% if contentType == 'item' %}
{% block d3ordermanager_exporttemplate_csv_content %}
{% if aContentList %}
{% for contentlistkey, sContent in aContentList %}
{% block d3ordermanager_exporttemplate_csv_contentfield %}
{{ sEnclosure }}{{ sContent }}{{ sEnclosure }}
{% endblock %}
{% if loop.last == false %}
{{ sFieldSeparator }}
{% else %}
{{ sLineSeparator }}
{% endif %}
{% endfor %}
{% endif %}
{% endblock %}
{% endif %}
{% endautoescape %}