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.

Archive /

Our old forums are still available as a read-only archive.

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

Themes in v2.1.0


Go to End
Reply


10 Posts   4245 Views

Avatar
gakenny

Community Member, 153 Posts

6 October 2007 at 8:25am

Hello,

With the new themes folder offered in v2.1.0, does this now mean that all stylesheets and images associated with the presentation of the website should be now located here rather than under mysite? Does this mean that the css, images, etc. folders under mysite are obsolete? Is there any documentation relating to this change available?

Thanks,

Gary

Avatar
Willr

Forum Moderator, 5513 Posts

6 October 2007 at 10:46am

They are obsolete in a way, I think mysite is used if you want to override a theme? or as a backup if there is no themes.. anyway you should develop your site as a custom theme in the themes folder.

Avatar
gakenny

Community Member, 153 Posts

6 October 2007 at 5:30pm

Hi Will,

Thanks for the reply. It seems that I cannot override the contents of the css, images, templates directories under the themes directory with the contents of mysite. The only folder that appears to work under mysite now is the code folder.

Cheers,

Gary

Avatar
Willr

Forum Moderator, 5513 Posts

7 October 2007 at 4:41pm

ah ok. I would just use the themes folder for all your custom css/templates and leave mysite for the code.. Maybe this is getting a tad confusing as its not too obvious as to where you edit css/templates..

Avatar
Karl

2 Posts

18 October 2007 at 6:19am

I've experienced a similar issue. mysite/templates/Page.ss doesn't override themes/blackcandy/templates/Page.ss. The above post indicates that changes should be made in the theme but this doesn't make sense to me conceptually. I should be able to drop in a new theme and it should work (maybe not perfectly, but still work) without edits to the theme. Any edits I make should be in mysite without need to change the theme.

Additionally, this page, http://doc.silverstripe.com/doku.php?id=themes:developing , indicates that mysite should override the theme but this is not happening. Any suggestions or input?

Avatar
Damo

5 Posts

25 October 2007 at 12:25pm

Edited: 25/10/2007 12:28pm

Yar, I am also led astray by 'mysite/templates/Page.ss' not overriding 'themes/blackcandy/templates/Page.ss' as it was described in the aforementioned wiki page. Anyone able to shed light on this? This is just a "me too" but what's the official stance? Overriding with mysite or simply tailoring a theme directly?

Avatar
Sam

Administrator, 685 Posts

25 October 2007 at 2:29pm

This is a bit of an open issue. The current thinking is to do the following:

* Leave CSS and SS files out of the mysite folder.
* If you want to create your own HTML, and don't want to edit the theme, then duplicate the theme and edit that.
* If you want to start from scratch, then create your own theme from scratch.

The theme files take precedence over the files in mysite because the concept was that you'll override the built-in template (in mysite) with one from a theme.

However, this isn't clearly spelled out in the documentation.

From a product development perspective, the best bet is probably to remove the .ss and .css files from the mysite folder in the installer, and to improve the documentation about how to create your own custom theme.

The mysite folder should just contain your PHP and JS code.

Avatar
Ingo

Forum Moderator, 801 Posts

25 October 2007 at 4:35pm

overriding mysite with blackcandy might be a common scenario when using the installer, but i think usually its the other way around: you have a working theme, and want to customize little bits.

for example, i just set up a instance where i don't care too much about layout, and used the default blackcandy. i DID care about the "your sitename here" title though. in the use-case described by you, i'd have to duplicate the whole theme dir to make this change (rather than just overriding Page.ss) - and loose easy upgrade-options through svn.

if its logically possible to give mysite-templates priority if present, i suggest we should give this option to the developer. he can still decide to duplicate the whole theme if the amount of customizations justifies it.

what do you guys think?

Go to Top