Reputation: 1477
I am trying to include my CSS and JS files on my Twig
template like this
{% block stylesheets %}
<link href="{{ asset('bootstrap.min.css') }}" rel="stylesheet" />
{% endblock %}
{% block javascripts %}
<script src="{{ asset('jquery-3.2.1.slim.min.js') }}"></script>
<script src="{{ asset('popper.min.js') }}"></script>
<script src="{{ asset('bootstrap.min.js') }}"></script>
{% endblock %}
I get an error on Slim like this
Unknown "asset" function.
How do I include my CSS
and JS
files in Twig
via Slim
?
Upvotes: 1
Views: 1516
Reputation: 17624
There’s no such function by default. Either install an Asset extension or hardcore links by yourself.
Upvotes: 4