Skip to content

Get link to .css and .js files in tempalte #719

Open
@sowinski

Description

@sowinski

Hi,

I want to load some of my .css files and .js files "lazy". For this purpose I need only the url to the files.

Example
{% javascript 'startpage' %}
returns a <script> tag

But I would like to do something like

var startpage_url = "{% javascript 'startpage' urlonly %}";
// load the script on a specific event (For example user scrolled down)
$(document.head).append($('<script>', { src: startpage_url }));

How can I do this? I guess this is not possible out of the box?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions