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

require themedCSS() outputs all files double


Go to End


3 Posts   1610 Views

Avatar
suntrop

Community Member, 141 Posts

6 September 2012 at 5:02am

Edited: 06/09/2012 5:02am

I have a strange problem and don't know how to fix it. When I put in my page.php or page.ss

Requirements::themedCSS('master');

<% require themedCSS(master) %>

I see all CSS files twice in my source code.
<link rel="stylesheet" type="text/css" href="/themes/max-rill-schule/css/master.css?m=1346850103" />
<link rel="stylesheet" type="text/css" href="/themes/mrs/css/popups.css?m=1346230048" />
<link rel="stylesheet" type="text/css" href="/themes/mrs/css/ie_fixes.css?m=1346230054" />
<link rel="stylesheet" type="text/css" href="/themes/mrs/css/master.css?m=1346850103" />
<link rel="stylesheet" type="text/css" href="/themes/mrs/css/popups.css?m=1346230048" />
<link rel="stylesheet" type="text/css" href="/themes/mrs/css/ie_fixes.css?m=1346230054" />

When I remove the required function nothing is set. Why do I get all files double?
(To clarify: I only have it in my php or template file, not in both files at the same time)

Is this a known bug in SS 3.01?

Avatar
Willr

Forum Moderator, 5523 Posts

7 September 2012 at 9:48pm

Avatar
suntrop

Community Member, 141 Posts

11 September 2012 at 2:07am

Thanks. I didn't have found the other post.