themes/BootstrapTheme/templates/bundles/DediSyliusSEOPlugin/Shop/Header/_title.html.twig line 1

Open in your IDE?
  1. {% set locale = sylius.localeCode|default(sylius_base_locale) %}
  2. {% if resource is defined and resource.referenceableContent is defined and resource.referenceableContent is not null %}
  3.     {% set donothing = resource.referenceableContent.setCurrentLocale(locale) %}
  4.     {% set seo = resource %}
  5. {% endif %}
  6. {% if sylius.channel.referenceableContent is defined and sylius.channel.referenceableContent is not null %}
  7.     {% set donothing = sylius.channel.referenceableContent.setCurrentLocale(locale) %}
  8.     {% set baseSeo = sylius.channel %}
  9. {% endif %}
  10. {% if seo is defined and seo.metadataTitle %}
  11.     {{ seo.metadataTitle }}
  12. {% else %}
  13.     {% if getType(resource) == "channel" %}
  14.         {{ sylius.channel.name }}
  15.     {% elseif getType(resource) == "product" %}
  16.         {% if app_get_page_meta_by_code("product",{ 'product': resource }) is not empty %}
  17.             {% set meta = app_get_page_meta_by_code("product", { 'product': resource }) %}
  18.             {% if meta.title is not null %}
  19.                 {{ meta.title }}
  20.             {% endif %}
  21.         {% endif %}
  22.     {% endif %}
  23. {% endif %}