I have a situation like this in my twig file:
{% javascripts
'js/functions.js'
'js/plugins.js'
'js/editor.js'
'js/calendar.js'
%} [...]
And I would love to comment some scripts out using
{% javascripts
{# 'js/functions.js' #}
'js/plugins.js'
'js/editor.js'
'js/calendar.js'
%} [...]
But this isnt allowed, I get an Unexpected character "#"
error.
Is there a common practice how to handle this?
That is unsupported twig syntax, obviously. So it's up to you how to hide it. I would do something like this:
{# 'js/functions.js'#}
{% javascripts
'js/plugins.js'
'js/editor.js'
'js/calendar.js'
%} [...]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With