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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

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

changing link rel=stylesheet


Go to End


2 Posts   2584 Views

Avatar
George

Community Member, 41 Posts

9 February 2009 at 7:48am

With "Requirements::themedCSS('<cssfile>')" you get "<link rel="stylesheet" type="text/css" href="<cssfile>".
Do any parameters exist for themedCSS?
For example to get <link rel="stylesheet" type="text/css" media="screen" href="<cssfile>" or <link rel="stylesheet" type="text/css" media="print" .href="<cssfile>".

Avatar
Willr

Forum Moderator, 5523 Posts

9 February 2009 at 10:26am

Edited: 09/02/2009 10:26am

The second parameter of Requirements::themedCSS() is the media type. Eg

Requirements::themedCSS('mycssprintfile', 'print');