Hello,
I have a page using a Twig include to a partials/some-content.html.twig and in this file I want to load a specific js script.
I tried this way:
{# page.html.twig #}
{% extends 'partials/base.html.twig' %}
{% block content %}
<div class="container">
{% include "partials/some-content.html.twig" %}
</div>
{% endblock %}
{# partials/some-content.html.twig #}
{% do assets.addJs("https://some.cdn/some-script.js") %}
<div class="some-content"></div>
But the script https://some.cdn/some-script.js is not added to the page.
Is there a special way to add the script in this case ?