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. {% elseif title is defined and title %}
  13.     {{ title }}
  14. {% else %}
  15.     {% if getType(resource) == "channel" %}
  16.         {{ sylius.channel.name }}
  17.     {% elseif getType(resource) == "product" %}
  18.         {% if app_get_page_meta_by_code("product",{ 'product': resource }) is not empty %}
  19.             {% set meta = app_get_page_meta_by_code("product", { 'product': resource }) %}
  20.             {% if meta.title is not null %}
  21.                 {{ meta.title }}
  22.             {% endif %}
  23.         {% endif %}
  24.     {% endif %}
  25. {% endif %}