{% import '_includes/forms' as forms %} {% set frequencyOptions = { 'always': 'always', 'hourly': 'hourly', 'daily': 'daily', 'weekly': 'weekly', 'monthly': 'monthly', 'yearly': 'yearly', 'never': 'never', } %} {% set priorityOptions = { '1.0': '1.0', '0.9': '0.9', '0.8': '0.8', '0.7': '0.7', '0.6': '0.6', '0.5': '0.5', '0.4': '0.4', '0.3': '0.3', '0.2': '0.2', '0.1': '0.1', '0.0': '0.0', } %} {% for section in sections %} {% endfor %}
{{ 'Enabled'|t }} {{ 'Section'|t }} {{ 'URL Format'|t }} {{ 'Entries'|t }} {{ 'Change Frequency'|t }} {{ 'Priority'|t }}
{{- forms.checkbox({ name: "enabled[#{section.id}]", value: true, checked: settings.sections[section.id] is defined }) -}} {{- section -}} {%- if section.isHomepage() -%}
{%- else -%} {{ section.urlFormat }} {%- endif -%}
{{- craft.entries.section(section).total() -}} {{- forms.selectField({ name: "changefreq[#{section.id}]", options: frequencyOptions, value: settings.sections[section.id].changefreq|default('weekly') }) -}} {{- forms.selectField({ name: "priority[#{section.id}]", options: priorityOptions, value: settings.sections[section.id].priority|default(section.isHomepage() ? '1.0' : '0.5') }) -}}