{% extends "_layouts/cp" %} {% set fullPageForm = true %} {% import "_includes/forms" as forms %} {% set headlessMode = craft.app.config.general.headlessMode %} {% block content %} {{ actionInput('categories/save-group') }} {{ redirectInput('settings/categories') }} {% if categoryGroup.id %}{{ hiddenInput('groupId', categoryGroup.id) }}{% endif %} {{ forms.textField({ first: true, label: "Name"|t('app'), instructions: "What this category group will be called in the control panel."|t('app'), id: 'name', name: 'name', value: categoryGroup.name, errors: categoryGroup.getErrors('name'), autofocus: true, required: true, }) }} {{ forms.textField({ label: "Handle"|t('app'), instructions: "How you’ll refer to this category group in the templates."|t('app'), id: 'handle', name: 'handle', class: 'code', autocorrect: false, autocapitalize: false, value: categoryGroup.handle, errors: categoryGroup.getErrors('handle'), required: true }) }} {{ forms.textField({ label: "Max Levels"|t('app'), instructions: "The maximum number of levels this category group can have. Leave blank if you don’t care."|t('app'), id: 'maxLevels', name: 'maxLevels', value: categoryGroup.maxLevels, size: 5, errors: categoryGroup.getErrors('maxLevels') }) }} {{ forms.selectField({ label: 'Default {type} Placement'|t('app', {type: 'Category'|t('app')}), instructions: 'Where new {type} should be placed by default in the structure.'|t('app', {type: 'categories'|t('app')}), id: 'default-placement', name: 'defaultPlacement', options: [ {label: 'Before other {type}'|t('app', {type: 'categories'|t('app')}), value: 'beginning'}, {label: 'After other {type}'|t('app', {type: 'categories'|t('app')}), value: 'end'}, ], value: categoryGroup.defaultPlacement, }) }}