CSS file parsing in modules

CSS file parsing in modules

by Michael Gwynne -
Number of replies: 1

I have several files being included as part of a module (they are not named styles.css), but the background-image: url('[[pix:blah]]') part isn't being parsed into a proper URL.

Am I doing something wrong? Or do I HAVE to put all the CSS into a styles.css file?

Average of ratings: -
In reply to Michael Gwynne

Re: CSS file parsing in modules

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You should be putting all your CSS into the styles.css file, that way it can be cached as a single file that is sent to the user's browser (and then stored there for 24 hours, without needing to be sent from the server again). This will also solve the problem of the [[pix:blah]] part not being parsed.