custom/plugins/theme/src/Resources/views/storefront/layout/meta.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}
  2. {% block layout_head_canonical %}
  3.     {% if page.metaInformation.canonical %}
  4.         {% set canonicalUrl = page.metaInformation.canonical %}
  5.         
  6.         {# Für Listing-Seiten: Paginierung als Parameter hinzufügen #}
  7.         {% if app.request.get('p') and app.request.get('p') != '1' %}
  8.             {% if '?' in canonicalUrl %}
  9.                 {% set canonicalUrl = canonicalUrl ~ '&p=' ~ app.request.get('p') %}
  10.             {% else %}
  11.                 {% set canonicalUrl = canonicalUrl ~ '?p=' ~ app.request.get('p') %}
  12.             {% endif %}
  13.         {% endif %}
  14.         
  15.         <link rel="canonical" href="{{ canonicalUrl }}" />
  16.     {% endif %}
  17. {% endblock %}