templates/layouts/layout.html.twig line 1

Open in your IDE?
  1. <!doctype html>
  2. <html lang="{{ app.request.locale }}">
  3. <head>
  4.     <!-- Required meta tags -->
  5.     <meta charset="utf-8">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7.     {% apply spaceless %}
  8.         {% if not document is defined or not document %}
  9.             {% set document = pimcore_document(1) %}
  10.         {% endif %}
  11.         {% if document is instanceof('\\Pimcore\\Model\\Document\\Link') %}
  12.             {# @var document \Pimcore\Model\Document\Link #}
  13.             {% set document = document.getObject() %}
  14.         {% endif %}
  15.         {% if document.getTitle() is not empty %}
  16.             {% do pimcore_head_title().set(document.getTitle()) %}
  17.         {% endif %}
  18.         {% if document.getDescription() is not empty %}
  19.             {% do pimcore_head_meta().setDescription(document.getDescription()) %}
  20.         {% endif %}
  21.         {% set isPortal = ((isPortal is defined) and isPortal) %}
  22.     {% endapply %}
  23.     {# we're using the deferred extension here to make sure this block is rendered after all helper calls #}
  24.     {% block layout_head_meta deferred %}
  25.         {{ pimcore_head_title() }}
  26.         {{ pimcore_head_meta() }}
  27.         {% if pimcore_placeholder('canonical').count() %}
  28.             <link rel="canonical" href="{{ pimcore_placeholder('canonical') }}"/>
  29.         {% endif %}
  30.     {% endblock %}
  31.     {% block head_stylesheets deferred %}
  32.         {{ pimcore_head_link() }}
  33.         {{ encore_entry_link_tags('app') }}
  34.     {% endblock %}
  35. </head>
  36. <body>
  37. {# get root node if there is no document defined (for pages which are routed directly through static route) #}
  38. {% if not document is defined or not document %}
  39.     {% set document = pimcore_document(1) %}
  40. {% endif %}
  41. <div>
  42.     {{ block('content') }}
  43. </div>
  44. <div id="app">
  45.     <app>
  46.     </app>
  47. </div>
  48. {# include a document-snippet - in this case the footer document #}
  49. {{ pimcore_inc(document.getProperty('footer')) }}
  50. {# output scripts added before #}
  51. {% block headscripts deferred %}
  52. {{ pimcore_head_script() }}
  53. {% endblock %}
  54. {% block inlinescripts deferred %}
  55.     {{ encore_entry_script_tags('app') }}
  56.     {{ pimcore_inline_script() }}
  57. {% endblock %}
  58. </body>
  59. </html>