{# ------------------------ #} {# Available Variables #} {# ------------------------ #} {# Attributes: #} {# type, name, handle, instructions, attribute, default, feed, feedData #} {# ------------------------ #} {# Fields: #} {# name, handle, instructions, feed, feedData, field, fieldClass #} {# ------------------------ #} {% import 'feed-me/_macros' as feedMeMacro %} {% import '_includes/forms' as forms %} {% extends 'feed-me/_includes/fields/_base' %} {% block extraSettings %}
{{ 'Data provided for this element is:'|t('feed-me') }} {% set matchAttributes = [ { value: 'title', label: 'Title'|t('feed-me') }, { value: 'elements.id', label: 'ID'|t('feed-me') }, { value: 'slug', label: 'Slug'|t('feed-me') }, ] %} {% for field in craft.app.fields.getAllFields() %} {% if craft.feedme.fieldCanBeUniqueId(field) %} {% set matchAttributes = matchAttributes|merge({ ('field_' ~ field.handle): field.name }) %} {% endif %} {% endfor %} {{ forms.selectField({ name: 'options[match]', class: '', value: hash_get(feed.fieldMapping, optionsPath ~ '.match') ?: '', options: matchAttributes, }) }}
{% endblock %}