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

Flush and config change doesn't work


Reply

6 Posts   2228 Views

Avatar
Viken

7 September 2010 at 7:23am Community Member, 1 Post

Greetings from a fellow Kiwi currently in the United States!

I have just downloaded the latest version of SilverStripe (ver 2.4.1) and installed on my hosting account with Surpass Hosting. The installation seemed to go well and the site appears to be working. However, when I changed themes I started having issues. I initially installed with the Black Candy theme, and followed the instructions and changed the _config.php file so it reads as follows:

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

No matter what I do however, all I can see is the Black Candy theme. I tried the <url>?flush=1 address, and I checked it in a different browser. It's still Black Candy however. Now I am wondering if there is something with my web hosting company that may be causing this (something not writeable perhaps?) Perhaps I missed an error when installing although I don't recall one.

Is there something I should check that may be causing this inability to update the theme? I have previously used Joomla, Wordpress, Invision, phpbb, SMF and a host of other packages and never had an issue so I think it may be something relatively minor .... I just can't work out what it may be.

Any advice would be appreciated.

Avatar
Martijn

7 September 2010 at 8:21am Community Member, 271 Posts

Try ?flush=all

You could also try to create a folder silverstripe-cache in siteroot so Silverstripe will use that folder for the cache files.

Also make sure you don't have set a template in SiteConfig.

Hope this helps.

Avatar
NARKOZ

17 September 2010 at 4:06am Community Member, 25 Posts

If you use SS 2.4, change theme from admin panel: yoursite.com/admin

Avatar
Snowy190uk

22 October 2010 at 3:39am Community Member, 3 Posts

Just noticed this topic - I should have looked a but bit more before posting (see 'Themes not working' post) - but I am also having the same problem.

Regardless of what theme I download, or the amount of times I save the theme selection option in the admin area, I don't get any change of theme - just the basic text and some sort of default .ss file presumably used when all else fails!

If I use the default (blackcandy) theme it works, but no downloaded theme does. Its such a simple thing, buts its really annoying.

Avatar
HenryPenny

22 February 2014 at 3:04pm (Last edited: 22 February 2014 3:08pm), Community Member, 1 Post

I have had this issue and I found one potential problem.

If your homepage record in the CMS is of type Page. You need a template called:

/themes/<your theme>/templates/Page.ss

If this is not available SS will grab a template from somewhere else.

Probably /framework/templates/Controller.ss

I found this after 4 hours of debugging the source code. I'm not sure if this is in the docs anywhere - but I couldn't find it, and I see quite a bit of frustration around this problem.

This might bite you if you start making new Classes e.g. HomePage extends Page...

You need to rename or copy your template to HomePage.ss in this example

Avatar
thomas.paulson

22 February 2014 at 5:11pm Community Member, 79 Posts

Hi Henry,

I think it will better to create new layout for HomePage

/themes/<your theme>/templates/Layout/HomePage.ss.