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.

Content Editor Discussions /

Forum for content editors and CMS users.

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

Css inside Content


Go to End


2 Posts   2398 Views

Avatar
pinkfloydim

Community Member, 5 Posts

24 April 2013 at 5:27pm

I have some html code, which has some css.
This css is inside the themes folder.
How can I apply the styles when the site renders, as currently not working.

Would be cool to see it styles inside the editior too?

Avatar
Webdoc

Community Member, 349 Posts

25 April 2013 at 3:56am

Add in your themes/theme-name/templates/Page.ss
those lines:
<% require themedCSS(layout) %>
<% require themedCSS(typography) %>
<% require themedCSS(form) %>
If your style css file is called style.css and its in themes/theme-name/css folder add line:
<% require themedCSS(style) %>

your theme can u change in mysite/_config.php file using line:
SSViewer::set_theme('theme-name');

Arvixe Web Hosting / SilverStripe Community Liaison | Looking for quality SilverStripe Web Hosting? Look no further than Arvixe Web Hosting!