Calling unknown method: craft\models\Section::hasUrls() - Craft 3 upgrade I am migrating a site from Craft 2 - Craft 3. In my sitemap template I have the following code;

{% for section in craft.sections.getAllSections() %}
  {# We only care about sections that have URLs #}
  {% if section.hasUrls %}
    &lt;div class="article mb-8"&gt;
      &lt;h2 class="pt-6 mb-4 border-bottom" id="{{  section.name|kebab }}"&gt;{{ section.name }}&lt;/h2&gt;
      &lt;ul class="ml-4 list-reset"&gt;
        {# Loop through each of its entries #}
        {% for entry in craft.entries.sectionId(section.id).limit(null) %}
          &lt;li class="mb-2 text-sm"&gt;&lt;a href="{{ entry.url }}" class="arrow--before"&gt;{{ entry.title }}&lt;/a&gt;&lt;/li&gt;
        {% endfor %}
      &lt;/ul&gt;
    &lt;/div&gt;
  {% endif %}
{% endfor %}


I am getting the error Calling unknown method: craft\models\Section::hasUrls()

I cannot find the equivalent or updated value in the Craft 3 docs. Can anyone advise as to how this should be rewritten or what I should use instead of if section.hasUrls in Craft 3?
In Craft 3, hasURL() is part of a section's siteSettings() as a section exists in multiple sites and can have URLs in one site but not another.

If you are not using multi-sites, a drop-in replacement for your code would be:

{% for section in craft.sections.getAllSections() %}
  {% for sectionSettings in section.siteSettings %}
      {# We only care about sections that have URLs #}
      {% if sectionSettings.hasUrls %}
        &lt;div class="article mb-8"&gt;
          &lt;h2 class="pt-6 mb-4 border-bottom" id="{{  section.name|kebab }}"&gt;{{ section.name }}&lt;/h2&gt;
          &lt;ul class="ml-4 list-reset"&gt;
            {# Loop through each of its entries #}
            {% for entry in craft.entries.sectionId(section.id).limit(null) %}
              &lt;li class="mb-2 text-sm"&gt;&lt;a href="{{ entry.url }}" class="arrow--before"&gt;{{ entry.title }}&lt;/a&gt;&lt;/li&gt;
            {% endfor %}
          &lt;/ul&gt;
        &lt;/div&gt;
      {% endif %}
  {% endfor %}
{% endfor %}