Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Cascading Style sheets, themes, media and alternative style sheets

Go to End

10 Posts   4600 Views


Community Member, 105 Posts

22 February 2008 at 6:10pm

What is the smartest way to include a special style sheet that is only in existence for one page and is quite large?

I have tried to over-ride the init function for that page type in its controller:

class Widget_Controller extends Page_Controller {

   function init() {

but to no avail. Should this work?

Design City

38 Posts

19 March 2008 at 8:47pm

willr: I don't use it often but I have used it before. Adding a title to a css sheet enables you to have alternative style sheets set up in the document that have to be 'selected'. This lets you do reasonably useless things like switching themes, and reasonably useful things like having alternative high contrast stylesheet for users with impaired vision, or an alternative stylesheet with a larger font size etc.

We use them on our corporate site ( to increase the font size.

Go to Top