templates/block/seo/opengraph.html.twig line 1

Open in your IDE?
  1. {% if app.request.get('_route') == 'prod_cont' %}
  2.     {% set type = 'product' %}
  3.     {% set pic = asset(env.host_static ~ '/pic/prod/' ~ prod.id ~ '.jpg', 'pic') %}
  4. {% elseif app.request.get('_route') in ['prod_list_cat', 'prod_list_cat_filter', 'prod_list_cat_spec_filter', 'prod_list_cat_spec', 'prod_list_spec'] %}
  5.     {% set type = 'product.group' %}
  6.     {% set pic = asset(env.host_static ~ '/pic/cat/' ~ cat.id ~ '.jpg', 'pic') %}
  7. {% elseif app.request.get('_route') == 'articles_cont' %}
  8.     {% set type = 'article' %}
  9.     {% set pic = asset('favicon/mstile-144x144.png', 'pic') %}
  10. {% else %}
  11.     {% set type = 'website' %}
  12.     {% set pic = asset('favicon/mstile-144x144.png', 'pic') %}
  13. {% endif %}
  14. <meta property="og:title" content="{{ page.title ? page.title : sett.sitename ~ '. ' ~ page.name }}"/>
  15. <meta property="og:type" content="{{ type }}"/>
  16. <meta property="og:url" content="{{ app.request.schemeAndHttpHost ~ app.request.pathinfo }}"/>
  17. <meta property="og:image" content="{{ pic }}"/>