Jump to:

23553 Posts in 19380 Topics by 2892 members

General Questions

SilverStripe Forums » General Questions » How to add a style sheet to a very basic module [Partly solved]

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1 2 3
Go to End
Author Topic: 1157 Views
  • simples
    Community Member
    76 Posts

    Re: How to add a style sheet to a very basic module [Partly solved] Link to this post

    Hi jak,

    Thank you for your helpful tips and I take your point about observing case.

    I have now updated helloworld to show a slideshow.

    When I put the following line in module_slideshow/templates/Slideshow.ss

    <% require css(module_slideshow/css/slideshow.css) %>

    the slideshow becomes styled.

    However when I comment out this control structure and instead put the following code in module_slideshow/code/Slideshow.php and refresh both the database and page


    class Slideshow extends Page {

    class Slideshow_Controller extends Page_Controller {
    public function init() {

    the page loses styling.

    Unfortunately replacing the Requirements line with

    Requirements::themedCSS("slideshow", "module_slideshow");

    makes no difference.

Page: 1 2 3
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.