Jump to:

23550 Posts in 19336 Topics by 2890 members

General Questions

SilverStripe Forums » General Questions » Wrong path in css on server

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
Go to End
Author Topic: 414 Views
  • Harley
    Community Member
    153 Posts

    Wrong path in css on server Link to this post

    Hi there,

    Ok I've never come across this before. I've just uploaded a website for a client who had their own hosting (always a nightmare!) with TsoHost. Everything looks to be fine except for image paths in my css according to Firebug. Background-images seem to be pointing to the assets folder instead of my theme folder. Paths for @font-face however seem to find the webfont files no problem strangely. In my css the background-images are relative to the root and display fine on my localhost.

    Has anyone encountered this before and is there something I can set in the config to default my paths in css?

    Any help is much appreciated.


  • Harley
    Community Member
    153 Posts

    Re: Wrong path in css on server Link to this post

    PS I'm not sure if was worth mentioning but in my Page.php file I am concatenating my css and js files like so:

       // ******************** concatenate all javascript and css ******************** //
       $theme_folder = sprintf('themes/%s', SSViewer::current_theme());

          $js_files = array(
             sprintf('%s/js/jquery.1.9.1.min.js', $theme_folder),
             sprintf('%s/js/common.js', $theme_folder),

          $css_files = array(
                sprintf('%s/css/theme.css', $theme_folder),
          foreach($js_files as $js) {

          foreach($css_files as $css) {

             Requirements::combine_files("js.js", $js_files);
             Requirements::combine_files("css.css", $css_files);
       // ******************** end concatenation ******************** //


Page: 1
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.