Hello, first of all what an amazing CMS Silverstripe is! When is the book due for release?
I have a small problem with a site I'm building at the moment. I have some custom css and javascript I'm running for some progressive enhancements on my navigation.
The trouble is that when I use a page type other than the default 'Page' it is not picking up the extra javascript files.
This is what my Page.php looks like:
class Page_Controller extends ContentController {
public function init() {
parent::init();
Requirements::themedCSS("layout");
Requirements::themedCSS("typography");
Requirements::themedCSS("form");
Requirements::themedCSS("navigation");
Requirements::javascript("http://localhost/wwwroot/elevator/themes/elevator/javascript/jquery-1.3.2.js");
Requirements::javascript("http://localhost/wwwroot/elevator/themes/elevator/javascript/nav.js");
}
Am I right to say that any other page types you create as long as you specify:
class ContactPage_Controller extends Page_Controller{
...should inherit the default Page type classes for requirments? It seems to pick up the css but not the javascript files.
One more thing, I've come this far and this my first time developing with Silverstripe. I'm a bit confused however as to how I write my paths, as you will see above I have written the absolute path to get working results, when trying relative it simply doesn't work. What am I doing wrong here? Need to know for when I go live with this beast!