{% extends "_layouts/cp" %} {% import "_includes/forms" as forms %} {% set crumbs = [ { label: "Settings"|t, url: url('settings') }, { label: "Sections"|t, url: url('settings/sections') } ] %} {% if section is not defined and sectionId is defined %} {% set section = craft.sections.getSectionById(sectionId) %} {% if not section %}{% exit 404 %}{% endif %} {% endif %} {% set isNewSection = (section is not defined or not section.id) %} {% if isNewSection %} {% set title = "Create a new section"|t %} {% else %} {% set title = section.name %} {% endif %} {% set tabs = { settings: { label: "Settings"|t, url: '#section-settings' }, fieldlayout: { label: "Field Layout"|t, url: '#section-fieldlayout' } } %} {% set content %}
{% endset %} {% set js %} {% if section is not defined or not section.handle %}new Craft.HandleGenerator('#name', '#handle');{% endif %} {% for locale in craft.i18n.getSiteLocales() %} {% if section is not defined or section.locales[locale.id] is not defined or not section.locales[locale.id].urlFormat %} new Craft.EntryUrlFormatGenerator('#name', '#urlFormat-{{ locale.id }}'); {% endif %} {% endfor %} {% endset %} {% includeJs js %}