{% extends "sprout-base-seo/_layouts/base" %} {% import "_includes/forms" as forms %} {% import 'sprout-base/_includes/sproutcp' as sprout %} {% set sectionLayout = craft.app.request.getSegment(2) %} {% set pluginSettings = craft.sproutSeo.getSettings() %} {% set siteGroup = craft.app.sites.getGroupById(firstSiteInGroup.groupId) %} {% block content %}

{{ "Sections"|t }} {{ "Manage all of your Section-level SEO for Search, Social Sharing, Sitemaps, and Structured Data."|t }}

{% if enableMultilingualSitemaps and currentSite.id != firstSiteInGroup.id %} {% endif %}
{% if not enableMultilingualSitemaps or (enableMultilingualSitemaps and currentSite.id == firstSiteInGroup.id) %} {% for urlEnabledSectionTypeKey, urlEnabledSectionType in urlEnabledSectionTypes %} {% for urlEnabledSectionKey, urlEnabledSection in urlEnabledSectionType.urlEnabledSections %} {% set sitemapSection = urlEnabledSection.sitemapSection %} {% if loop.first %} {% set name = urlEnabledSectionType.getName() %} {% block sitemapSectionTableRowHead %}{% endblock %} {% endif %} {% if sitemapSection.name is defined %} {% set elementTableName = urlEnabledSectionType.getElementTableName() %} {% set sproutSeoHandle = elementTableName~':'~sitemapSection.handle %} {% block sitemapSectionTableRow %}{% endblock %} {% endif %} {% if loop.last %}

{% endif %} {% endfor %} {% endfor %} {% else %} {% set boxBody %}

{{ "Multi-lingual sitemaps have a single sitemap edit page for all URL-Enabled Sites in a Site Group. Edit the {group} Sitemap to manage the multi-lingual sitemap for all sites in the site group."|t('sprout-base', { group: siteGroup.name, url: url('sprout-seo/sitemaps') ~ '/' ~ firstSiteInGroup.handle })|raw }}

{% endset %} {{ sprout.mediaBox({ heading: "{group} Multi-lingual Sitemap"|t('sprout-base', { group: siteGroup.name }), body: boxBody, resourcePath: '@barrelstrength/sproutseo/icon.svg' }) }} {% endif %} {% if pluginSettings.enableCustomSections %}

{{ "Custom Pages"|t }}

{% block customSectionTableRowHead %}{% endblock %} {% if customSections|length %} {% for customSection in customSections %} {% set customSectionId = "customUrl-" ~ customSection.id %} {% block customSectionTableRow %}{% endblock %} {% endfor %} {% else %} {% set boxBody %}

{{ "Add a Custom URL for any page that doesn't exist in a URL-Enabled Section."|t('sprout-seo')|raw }}

{% endset %} {{ sprout.mediaBox({ heading: "Custom Pages"|t('sprout-seo'), body: boxBody, resourcePath: '@barrelstrength/sproutseo/icon.svg' }) }} {% endif %}
{% endif %} {% endblock %} {% do view.registerAssetBundle("barrelstrength\\sproutbase\\web\\assets\\cp\\CpAsset") %} {% do view.registerAssetBundle("barrelstrength\\sproutbase\\app\\seo\\web\\assets\\sitemaps\\SitemapsAsset") %} {% js %} new Craft.SproutSeo.Sitemaps(); new Craft.AdminTable({ tableSelector: '#custom-pages', deleteAction: 'sprout-seo/sitemaps/delete-sitemap-by-id', onDeleteObject: function(id) { if($('#custom-pages').find('tbody').find('tr').size() == 0) { $('#custom-pages').hide(); } } }); {% endjs %}