Tutor version: 10.5.3
I’m curious as to what the “best practice” would be for loading a stylesheet for a specific course. I have a custom theme installed and am running three different courses on the same platform. Let’s say I want to load a css file ONLY for CS103. I don’t want to load it on the CS101 or CS102 courses.
The way I implemented this was to add code to the top of the lms/templates/courseware/courseware.html file in my custom theme:
...
<%block name="header_extras">
% if 'CS103' in course.display_number_with_default:
<link href="${static.url('css/cs103.css')}" rel="stylesheet" type="text/css">
% endif
...
While this works and loads the custom css file, is this the best way to do this? Is there something already built into Open edX to do this already?
Thanks,