3217 Posts in 853 Topics by 812 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 867 Views |
-
Requirements not loading at all

24 March 2010 at 7:57am Last edited: 24 March 2010 9:05am
Hi... I've run into a situation that I've never had on any other Silverstripe site - I can't get Requirements to load at all:
In my mysite/code/Page.php
class Page_Controller extends ContentController {
public function init() {
parent::init();
Requirements::javascript("themes/RAC/js/customJquery.js");}
}Doesn't load anything - so I figured it might be something I'm doing so i changed
Requirements::javascript("themes/RAC/js/customJquery.js");
to
Requirements::customScript(<<<JS
alert("hi there");
JS
);just to see but no custom scripts or css is loading at all -
I'm going to try reinstalling the core just incase something got borked there but any ideas?
Dave
EDIT:
Hmm... Nothing on the reinstall but I added Requirements::set_write_js_to_body(false); to _config and now it works. It shouldn't do that though right? As well, CustomCSS doesn't work either so something is certainly off.
-
Re: Requirements not loading at all

6 March 2012 at 11:21pm
Hello Punch Rockgroin,
Im having the exact same problem but only one some pages.
Will adding Requirements::set_write_js_to_body(false); to the config file break the pages that are working?
TIA
Reece
| 867 Views | ||
|
Page:
1
|
Go to Top |


