{% extends "sprout-base-seo/_layouts/sitemaps" %} {% import "_includes/forms" as forms %} {% import 'sprout-base/_includes/sproutcp' as sprout %} {% set title = "Sitemaps"|t %} {% block contextMenu %} {% if craft.app.getIsMultiSite() %} {% if enableMultilingualSitemaps %} {% include "sprout-base-seo/sitemaps/_sitegroupmenu" with { selectedSiteId: currentSite.id, siteIds: editableSiteIds, urlFormat: "sprout-seo/sitemaps/{handle}" } %} {% else %} {% include "_elements/sitemenu" with { selectedSiteId: currentSite.id, siteIds: editableSiteIds, urlFormat: "sprout-seo/sitemaps/{handle}" } %} {% endif %} {% endif %} {% endblock %} {% set priorityList = { '1.0': '1.0 ↑ Highest'|t, '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 ↓ Lowest'|t } %} {% set frequencyList = { 'always': 'Always'|t, 'hourly': 'Hourly'|t, 'daily': 'Daily'|t, 'weekly': 'Weekly'|t, 'monthly': 'Monthly'|t, 'yearly': 'Yearly'|t, 'never': 'Never'|t } %} {% block sitemapSectionTableRowHead %} {{ name }} {{ "All of your " ~name~" that have unique URLs are listed here. Enable each "~name~" you want to include in your sitemap."|t }} {{ "URL Pattern"|t }} {{ "Priority"|t }} {% if loop.index == 1 %} {{ "The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0. This value does not affect how your pages are compared to pages on other sites—it only lets the search engines know which pages you deem most important for the crawlers." }}{% endif %} {{ "Change Frequency"|t }} {{ "The value 'always' should be used to describe documents that change each time they are accessed. The value 'never' should be used to describe archived URLs." }} {{ "Enabled"|t }} {% if loop.index == 1 %} {{ "Make the content in this section appear in your sitemap."|t }}{% endif %} {% endblock %} {% block sitemapSectionTableRow %} {% include "sprout-base-seo/sitemaps/_titlecolumn" with { sitemapSection: sitemapSection } %} {% if sitemapSection.uri == '__home__' %} {% else %} {{ sitemapSection.uri }} {% endif %} {{ forms.selectField({ name: 'sproutseo[sections][' ~ urlEnabledSectionKey ~ '][priority]', options: priorityList, value: sitemapSection.priority ?? 0.5, errors: "", required: false }) }} {{ forms.selectField({ name: 'sproutseo[sections][' ~ urlEnabledSectionKey ~ '][changeFrequency]', options: frequencyList, value: sitemapSection.changeFrequency ?? 'weekly', errors: "", required: false }) }} {{ forms.lightswitch({ name: 'sproutseo[sections][' ~ urlEnabledSectionKey ~ '][enabled]', on: sitemapSection.enabled == 1 ?? false }) }} {# @todo - Refactor Find a better way to get the columns to be even. This tag is unnecessary aside from helping to style the table column widths evenly. #} {% endblock %} {% block customSectionTableRowHead %} {{ "Custom URL"|t }} {{ "A Custom Page allows you to add a Custom URL that will display in your sitemap when enabled."|t }} {{ "Priority"|t }} {{ "Change Frequency"|t }} {{ "Enabled"|t }} {% endblock %} {% block customSectionTableRow %} {% include "sprout-base-seo/sitemaps/_titlecolumn" with { sitemapSection: customSection, isCustom: true } %} {{ forms.selectField({ name: 'sproutseo[sections][' ~ customSectionId ~ '][priority]', options: priorityList, value: customSection.priority ?? 0.5, errors: "", required: false }) }} {{ forms.selectField({ name: 'sproutseo[sections][' ~ customSectionId ~ '][changeFrequency]', options: frequencyList, value: customSection.changeFrequency ?? 'weekly', errors: "", required: false }) }} {{ forms.lightswitch({ name: 'sproutseo[sections][' ~ customSectionId ~ '][enabled]', on: customSection.enabled == 1 ?? false }) }} {% endblock %} {% js %} new Craft.SproutSeo.Sitemap(); {% endjs %}