templates/pages/homepage.html.twig line 1

Open in your IDE?
  1. {% extends "base.html.twig" %}
  2. {% block content %}
  3.     {# ... #}
  4.     {# define container element for rendering single page application #}
  5.     <div id="sulu-headless-container"></div>
  6.     {# initialize application with json data of current page to prevent second request on first load #}
  7.     <script>window.SULU_HEADLESS_VIEW_DATA = {{ headless|json_encode|raw }};</script>
  8.     <script>window.SULU_HEADLESS_API_ENDPOINT = '{{ sulu_content_path('/api') }}';</script>
  9.     {# start single page application by including built javascript code #}
  10.     <script src="/build/headless/js/index.js"></script>
  11. {% endblock %}