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.

Themes

Discuss SilverStripe Themes.

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

Theme Change Problem


Go to End
Reply

19 Posts   4229 Views

Avatar
Josh22

12 July 2010 at 1:51pm (Last edited: 12 July 2010 2:05pm), Community Member, 2 Posts

I've recently begun tooling around with SilverStripe and I like its potential. I've encountered one issue that I can't seem to track down through my own troubleshooting and my forum/net searches haven't turned up any similar problems either. Any insight is greatly appreciated.

The issue is that my site doesn't seem to do anything when I modify the SSViewer::set_theme('tutorial'); line in mysite/_config.php. When I change it to blackcandy or another theme I downloaded to test and run ?flush=1 absolutely nothing happens. The site just chugs along with the default tutorial theme. In addition to flushing the cache I also ran dev/build?flush=1 to rebuild the DB and the same thing happens. I even manually deleted the contents of silverstripe-cache folder and bounced the server, walked away and came back an hour later and still receive the template theme.

I know SilverStripe is picking up changes to mysite/_config.php because if I type in bogus DB info I'll get the expected errors but for some reason it just seems to chug along as if nothing changed when I attempt to modify the set_theme() setting.

Here's a snippet of my mysite/_config.php just to make sure I'm not crazy:

MySQLDatabase::set_connection_charset('utf8');

// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.org/themes/
SSViewer::set_theme('blackcandy');

// Set the site locale
i18n::set_locale('en_US');

SilverStripe v2.4.0

Again, any help is much appreciated, thanks!

Avatar
Josh22

13 July 2010 at 2:03pm Community Member, 2 Posts

Update: I just blew away the whole install, DB and all, and tried again and all is well.

Avatar
Varberg

14 July 2010 at 2:07am Community Member, 15 Posts

I get the same problem when I change the _config.php to

MySQLDatabase::set_connection_charset('utf8');

// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.org/themes/
//SSViewer::set_theme('blackcandy');
SSViewer::set_theme('vista');

// Set the site locale
i18n::set_locale('sv_SE');

I still have the black candy theme. Will I have to re-install everything?

Avatar
Willr

14 July 2010 at 10:37pm Forum Moderator, 5511 Posts

Varberg have you flushed your cache - yoursite.com?flush=all

Avatar
SDH

18 July 2010 at 7:00am Community Member, 10 Posts

There seems to be lots of confusion on this, changing themes in 2.4.0. I'm a new, confused user.

From the instructions, it looks like changing the SSViewer::set_theme() should just change the theme. I've tried a couple of themes, commenting out their SSViewer settings when I added another, but now although I have just one enabled, the site title/tagline page has a selector with _all_ themes, whether enabled or not, listed and active. Is this intended?

Also, are the themes adapted for 2.4.0, or do some of them break things? Somewhere in my experimenting I picked up the dreaded "javascript parse error", which appears when I try to save any- and everything. (Although for nearly all pages, it appears the save is completing correctly, even though the error appears.) Any hints on getting rid of this error?

Avatar
Turdus

18 July 2010 at 9:07am Community Member, 2 Posts

Hi Willr,

could you explain to me where exactly you have to add this ?flush=all??
I do not understand.
I have my site on the localhost and I don't have an official domainname yet.
Hope you can help me out.

Avatar
Willr

18 July 2010 at 9:58am Forum Moderator, 5511 Posts

Turdus have you read the tutorials? this tutorial covers flush and how it works. You need to open a webbrowser and append ?flush=all to the URL (even if you are still on localhost) eg for example if your site is installed on localhost in a folder 'silverstripe' you would visit this url in your browser localhost/silverstripe?flush=all

Avatar
Turdus

18 July 2010 at 8:25pm Community Member, 2 Posts

Hi Willr,

I'm very new to website building, and of course I'm also a bit too impatient to get everything working.
But it is working now!
Thanks a lot!

Go to Top