1368 Posts in 487 Topics by 521 members
|Go to End|
10 March 2014 at 2:12pm Last edited: 10 March 2014 2:16pm
The capitals and exclamation marks are there because this is the first time this has happened to me and I can't see what fundamental point I am missing.
I'm building a responsive theme for a client. In addition to the standard 'Layout' and 'Typography' stylesheets I have an additional stylesheet, 'Nav' that has successfully loaded. The last stylesheet is one that I have used on many sites, based on the 960px grid system with responsive breakpoints included. Naturally enough, this is the file that sets the width of elements on different devices. Strangely enough, despite being included in the theme's CSS directory and called in the head of my Page.ss file (<% require themedCSS('960-12-col') %>) the Stylesheet refuses to show and the pages look like crap.
I've even tried including a call in my Page.php file, (Requirements::themedCSS('960-12-col'); ), which I understand is not necessary in later versions of SilverStripe, but the bloody thing still isn't there!
So what am I missing here? Any pointers?
11 March 2014 at 9:33am
So you have two custom stylesheets, both living in the theme's css folder, and required ialongside? But one loads and the other doesn't and you checked case and location? Then I see no reason why - unless it's something with the filename... Try calling it grid.css just for the sake of it?
15 May 2014 at 7:38am
Requirements silently discards files that it can't find. To debug try requesting the file directly and check that it loads. Also try referencing it directly in your template rather than including via requirements. If this works and the file is accessible I would start debugging the themedCSS function in requirements (either using something like xdebug or old-skool error_log/var_dump) to find out what is going on.
|Go to Top|