I am putting together a site with 3 different sections, ie. Sales & Marketing, Branding & Default. Each section needs the same layout, but different colors in the submenu and headings.
I found [url=http://silverstripe.org/archive/show/217353]this post[/url] and put the following code into Controller.php:
$cssFile = 'default.css';
case 'test': $cssFile = '1.css'; break;
case 'contact': $cssFile = '2.css'; break;
However, back on the site if I create a new page "test" (url=test, title=test, navigation=test) the 1.css file is definitely not called. What am I doing wrong?
Also, is it possible to use wildcards so that any page with "test" in its title/url, ie. "test-page1" or "test-ing" will call the 1.css file?
Many thanks in advance.