templates/layouts/layout/html-head.html.twig line 1

Open in your IDE?
  1. <meta charset="utf-8">
  2. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  3. {% apply spaceless %}
  4.     {% if not document is defined or not document %}
  5.         {% set document = pimcore_document(1) %}
  6.     {% endif %}
  7.     {% if document is instanceof('\\Pimcore\\Model\\Document\\Link') %}
  8.         {# @var document \Pimcore\Model\Document\Link #}
  9.         {% set document = document.getObject() %}
  10.     {% endif %}
  11.     {% if document.getTitle() is not empty %}
  12.         {% do pimcore_head_title().set(document.getTitle()) %}
  13.     {% endif %}
  14.     {% if document.getDescription() is not empty %}
  15.         {% do pimcore_head_meta().setDescription(document.getDescription()) %}
  16.     {% endif %}
  17.     {% block metadata %}
  18.         {% if head_title|default(null) %}
  19.             {% do pimcore_head_title().prepend(head_title) %}
  20.         {% endif %}
  21.         {% if head_description|default(null) %}
  22.             {% do pimcore_head_meta().setDescription(head_description) %}
  23.         {% endif %}
  24.         {% if pimcore_website_config('site_title') is not empty %}
  25.             {% do pimcore_head_title().append(pimcore_website_config('site_title')) %}
  26.             {% do pimcore_head_title().setSeparator(' | ') %}
  27.         {% endif %}
  28.         {{ pimcore_head_title() }}
  29.         {{ pimcore_head_meta() }}
  30.         {% if pimcore_placeholder('canonical').count() %}
  31.             <link rel="canonical" href="{{ pimcore_placeholder('canonical') }}"/>
  32.         {% endif %}
  33.     {% endblock %}
  34.     {% include 'layouts/layout/html-head-styles.html.twig' %}
  35.     {% include 'layouts/layout/html-head-scripts.html.twig' %}
  36.     {% include 'layouts/layout/favicons.html.twig' %}
  37. {% endapply %}
  38. <script>
  39.     var jsLanguage = '{{ app.request.locale }}';
  40. </script>
  41. {% do pimcore_head_script().captureStart() %}
  42. $(function($){
  43. Storme.loadClass('general');
  44. {% if loadJsForAction()|length > 0 %}
  45.     Storme.callAction('{{ loadJsForAction()|first }}','{{ loadJsForAction()|last }}');
  46. {% endif %}
  47. });
  48. {% do pimcore_head_script().captureEnd() %}
  49. {% block headlink deferred %}
  50.    {{ pimcore_head_link() }}
  51. {% endblock %}
  52. {% block headscripts deferred %}
  53.    {{ pimcore_head_script() }}
  54. {% endblock %}