What features would you like to see in Craft Commerce?

includeJs

It would be nice if when using this functionality:

{% set js %}
console.log("Javascript here!");
{% endset %}
{% includejs js %}

You could put <script> tags wrapping inside of the set (that get stripped out of course), so that an IDE will recognize the script tag and format/highlight those segments of template as JS.

1 vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Jonathan CrawfordJonathan Crawford shared this idea  ·   ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Julian RutherfordJulian Rutherford commented  · 

        Depending on your IDE you can just do this:

        {% set js %}
        {# <script> #}
        console.log("Javascript here!");
        {# </script> #}
        {% endset %}
        {% includejs js %}

      Feedback and Knowledge Base