Jump to:

1382 Posts in 491 Topics by 521 members

Themes

SilverStripe Forums » Themes » [Resolved] Theme Not Applying

Discuss SilverStripe Themes.

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

Page: 1 2
Go to End
Author Topic: 2045 Views
  • jfusco
    Avatar
    Community Member
    52 Posts

    [Resolved] Theme Not Applying Link to this post

    I downloaded the darkshades theme.
    I extracted the compressed file.
    I copied the darkshades folder, the darkshades_blog folder and the._darkshades_blog file into the themes folder.
    I edited ..\mysite\_config.php as follows:

    <?php
    SSViewer::set_theme(”darkshades”);

    global $project;
    ...


    Added ?flush=1 to the end of the URL
    I still have the default theme. Did I miss something?

    I have actually flushed the cache both via SS and by deleting the cache of the browser and have used different browsers on different machines while I did other work on the site with the SSViewer statement in the config file.

    Thanks,
    Joe

  • ajshort
    Avatar
    Community Member
    244 Posts

    Re: [Resolved] Theme Not Applying Link to this post

    Hey There,

    There's another call to SSViewer::set_theme() lower in the default _config.php file which sets it to the blackcandy theme - did you remove this or comment it out? If you didn't it will be overriding your custom theme.

  • jfusco
    Avatar
    Community Member
    52 Posts

    Re: [Resolved] Theme Not Applying Link to this post

    I ended up with the tutorial install. There is no additional call that I can see. Here's the whole thing:

    <?php
    SSViewer::set_theme(”darkshades”);

    global $project;
    $project = 'mysite';

    global $databaseConfig;
    $databaseConfig = array(
       "type" => "MySQLDatabase",
       "server" => "p50mysql155.secureserver.net",
       "username" => "[hidden]",
       "password" => "[hidden]",
       "database" => "[hidden]",
    );

    // Sites running on the following servers will be
    // run in development mode. See
    // http://doc.silverstripe.com/doku.php?id=devmode
    // for a description of what dev mode does.
    Director::set_dev_servers(array(
       '',
    ));

    ?>


    Any other ideas?

  • jfusco
    Avatar
    Community Member
    52 Posts

    Re: [Resolved] Theme Not Applying Link to this post

    Got it!
    For some reason, the installer put the themes directory in the root folder of the installation. For themes to work, the themes folder apparently needs to be under the mysite directory. Once I moved it, the themes started working.

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: [Resolved] Theme Not Applying Link to this post

    The themes folder does need to be in the root. eg not in mysite. If you installed with the tutorial option if you changed from tutorial to wanting to use mysite + a theme then you need to add a line

    SSViewer::set_theme('blackcandy');

    To your _config.php file as if you install with tutorial it doesn't use a 'theme' structure. I fixed this for 2.3

  • jfusco
    Avatar
    Community Member
    52 Posts

    Re: [Resolved] Theme Not Applying Link to this post

    I used the GoDaddy.com one-click install and it installs 2.2.3 in tutorial mode. I did exactly as you said and the themes did not work until I copied the Themes folder under the mysite folder (I had moved the data from the tutorial folder and changed the appropriate line in _config.php to use mysite). Not sure why but for now I've switched back to default. I'm going to concentrate on getting my content inserted. Maybe by the time I'm done GD will have 2.3 available or I'll have figured out how to install it without using their installer.

    Thanks for the help.

  • keyser.soze
    Avatar
    Community Member
    2 Posts

    Re: [Resolved] Theme Not Applying Link to this post

    I installed last version yesterday and had the same problem.

    I tried your solution but it cause many themes don't work properly, when my attention was caught by the _config.php file permissions (644): my ftp client (filezilla) wasn't able to write new configuration and even change the file permissions so i had to delete it and re-upload with the new configuration line:

    SSViewer::set_theme(”acidlemon”);

    If you're using a ftp client take a look at the file permissions and turn back to the original directory schema.

    Hope this help!

  • jfusco
    Avatar
    Community Member
    52 Posts

    Re: [Resolved] Theme Not Applying Link to this post

    You are correct. My _config.php has a permissions level of 644. What does it need to be?

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