How can I set a base template in Locomotive.js?

69 Views Asked by At

I don't want to set my assets (CSS/JS, menu, etc) on each view from my project. Is there any way to set a base template and then call views just to fill its body?

Example:

<!-- my base template -->
<html>
    <head>
        <!-- my assets here -->
    </head>
    <body>
        <%= view.render() %> <!-- example of where I would render the views -->
    </body>
</html>

How could I do that?

1

There are 1 best solutions below

0
Bardi Harborow On

I've seen this done here but have yet to see how that works. Another option is to use EJS partials.