How to: Use custom CSS and JavaScript

This tutorial will how you how to add custom CSS and JavaScript to your project. The default Web Cube base template webcube/base.html comes with two Django template blocks, one at the top of the template called extra-head where custom CSS can be added and one close to the bottom of the template called extra_js where custom JavaScript can be inserted from other templates that inherit from webcube/base.html.







Custom CSS and JavaScript files can be loaded to your Web Cube installation using the Media Uploads. The webcube/base.html has been loaded to the project using the HTML Templates.


Then if for example the template used by the Pages needs custom CSS and JavaScript add the Django template blocks extra-head and extra_js to your flatpages/default.html template that's used by Pages.



Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk