{% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}{# Rich Snippts #}{% block layout_head_meta_tags %} {# Call the parent #} {{ parent() }} {# Output of the rich snippets #} {% block dreisc_seo__layout_head_meta_tags__ld_json %} {% set richSnippetDataStruct = page.extensions[constant('DreiscSeoPro\\Subscriber\\Installment\\RichSnippet\\RichSnippetSubscriber::DREISC_SEO_INSTALLMENT_RICH_SNIPPET_DATA')] %} {% if richSnippetDataStruct is not null %} <script type="application/ld+json"> {{ richSnippetDataStruct.ldJson|json_encode|raw }} </script> {% endif %} {% endblock %}{% endblock %}{# Social media #}{% block layout_head_meta_tags_opengraph %} {# Fecth social media data #} {% set socialMediaDataStruct = page.extensions[constant('DreiscSeoPro\\Subscriber\\Installment\\SocialMedia\\SocialMediaSubscriber::DREISC_SEO_INSTALLMENT_SOCIAL_MEDIA_DATA')] %} {% if null == socialMediaDataStruct %} {# Call the parent #} {{ parent() }} {% else %} {% block dreisc_seo__layout_head_meta_tags_opengraph__og_type %} <meta property="og:type" content="website"/> {% endblock %} {% block dreisc_seo__layout_head_meta_tags_opengraph__og_site_name %} <meta property="og:site_name" content="{{ basicConfig.shopName }}"/> {% endblock %} {% block dreisc_seo__layout_head_meta_tags_opengraph__og_title %} {% if socialMediaDataStruct.facebookTitle is not empty %} <meta property="og:title" content="{{ socialMediaDataStruct.facebookTitle }}"/> {% else %} <meta property="og:title" content="{{ metaTitle }}"/> {% endif %} {% endblock %} {% block dreisc_seo__layout_head_meta_tags_opengraph__og_description %} {% if socialMediaDataStruct.facebookDescription is not empty %} <meta property="og:description" content="{{ socialMediaDataStruct.facebookDescription }}"/> {% else %} <meta property="og:description" content="{{ metaDescription }}"/> {% endif %} {% endblock %} {% block dreisc_seo__layout_head_meta_tags_opengraph__og_image %} {% if socialMediaDataStruct.facebookImage is not empty %} <meta property="og:image" content="{{ socialMediaDataStruct.facebookImage }}"/> {% else %} <meta property="og:image" content="{{ theme_config('sw-logo-desktop') }}"/> {% endif %} {% endblock %} {% block dreisc_seo__layout_head_meta_tags_twitter__card %} <meta name="twitter:card" content="website"/> {% endblock %} {% block dreisc_seo__layout_head_meta_tags_twitter__site %} <meta name="twitter:site" content="{{ config('core.basicInformation.shopName') }}"/> {% endblock %} {% block dreisc_seo__layout_head_meta_tags_twitter__title %} {% if socialMediaDataStruct.twitterTitle is not empty %} <meta property="twitter:title" content="{{ socialMediaDataStruct.twitterTitle }}"/> {% else %} <meta property="twitter:title" content="{{ metaTitle }}"/> {% endif %} {% endblock %} {% block dreisc_seo__layout_head_meta_tags_twitter__description %} {% if socialMediaDataStruct.twitterDescription is not empty %} <meta property="twitter:description" content="{{ socialMediaDataStruct.twitterDescription }}"/> {% else %} <meta property="twitter:description" content="{{ metaDescription }}"/> {% endif %} {% endblock %} {% block dreisc_seo__layout_head_meta_tags_twitter__image %} {% if socialMediaDataStruct.twitterImage is not empty %} <meta property="twitter:image" content="{{ socialMediaDataStruct.twitterImage }}"/> {% else %} <meta property="twitter:image" content="{{ theme_config('sw-logo-desktop') }}"/> {% endif %} {% endblock %} {% endif %}{% endblock %}{# Robots tag #}{% block layout_head_meta_tags_robots %}{% apply spaceless %} {# Check for a robots tag #} {% set robotsTagDataStruct = page.extensions[constant('DreiscSeoPro\\Subscriber\\Installment\\RobotsTag\\RobotsTagSubscriber::DREISC_SEO_INSTALLMENT_ROBOTS_TAG_DATA')] %} {# Check for fallback #} {% if null == robotsTagDataStruct or robotsTagDataStruct.robotsTag is empty %} {# Call the parent #} {{ parent() }} {% else %} {% block dreisc_seo__layout_head_meta_tags_robots %} {{ robotsTagDataStruct.robotsTag }} {% endblock %} {% endif %}{% endapply %}{% endblock %}{# ** Canonical Link ** In shopware standard there is no canonical link on category pages / home page @see https://issues.shopware.com/issues/NEXT-8662#}{% block layout_head_canonical %}{% apply spaceless %} {# Check for the base information #} {% set baseInformationDataStruct = page.extensions[constant('DreiscSeoPro\\Subscriber\\Installment\\BaseInformation\\BaseInformationSubscriber::DREISC_SEO_INSTALLMENT_BASE_INFORMATION_DATA')] %} {% set canonicalDataStruct = page.extensions[constant('DreiscSeoPro\\Subscriber\\Installment\\Canonical\\CanonicalSubscriber::DREISC_SEO_INSTALLMENT_CANONICAL_DATA')] %} {% block dreisc_seo__layout_head_canonical %} {% if null != canonicalDataStruct and canonicalDataStruct.canonicalLink is not empty %} {% block dreisc_seo__layout_head_canonical__individual %} <link rel="canonical" href="{{ canonicalDataStruct.canonicalLink }}" /> {% endblock %} {% elseif 'frontend.home.page' == activeRoute %} {% block dreisc_seo__layout_head_canonical__home %} <link rel="canonical" href="{{ seoUrl('frontend.home.page', { }) }}" /> {% endblock %} {% elseif 'frontend.navigation.page' == activeRoute and null != baseInformationDataStruct %} {% block dreisc_seo__layout_head_canonical__navigation %} <link rel="canonical" href="{{ seoUrl('frontend.navigation.page', { navigationId: baseInformationDataStruct.navigationId }) }}" /> {% endblock %} {% endif %} {% endblock %}{% endapply %}{% endblock %}