1268 Posts in 351 Topics by 486 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1039 Views |
-
Query on themes directory structure

12 April 2011 at 2:43am
I have created several sites with their own theme using Silverstripe 2.3 without difficulty and am now doing my first site with 2.4. After setting the default theme in the config file. I have found that if I have the directory structure
/themes/mytheme/templates/Layout/MyTemplate.ss
as I have always done before then my template is not found and displayed. However if I follow the example of the new structure blackcandy has and use
/themes/mytheme/mytheme/templates/Layout/MyTemplate.ss
then it is found. However this means that things like the template variable $ThemeDir need to be used as
$ThemeDir/mytheme/images etc
which is a bit nonsensical as it is meant to do away with naming a theme dependent directory. I can't find anything about this in the documentation or forums. Have I got this right or am I missing something somewhere? -
Re: Query on themes directory structure

12 April 2011 at 2:51am
doesn't sound right to me... I use 2.4.x only and I've never seen this...
-
Re: Query on themes directory structure

13 April 2011 at 8:35pm
/themes/mytheme/mytheme/templates/Layout/MyTemplate.ss
Why do you have mytheme inside mytheme? That isn't required. $ThemeDir should return themes/mytheme/
-
Re: Query on themes directory structure

14 April 2011 at 4:14am
I started development with blackcandy checked out from github about 3 weeks ago. That has /themes/blackcandy/blackcandy/templates etc for the main blackcandy theme css/images/templates . I found that if I didn't mirror this structure for my theme then my templates were not found. This is why I have /themes/mytheme/mytheme. I would like to get rid of this double directory layer it feels very cumbersome but I need my templates to be findable.
-
Re: Query on themes directory structure

14 April 2011 at 11:37am
This is why I have /themes/mytheme/mytheme. I would like to get rid of this double directory layer it feels very cumbersome but I need my templates to be findable.
Don't use the double layer. All themes should go in the root themes/ dir. It is likely you had problems with moving it up a level perhaps because you didn't run ?flush=1. Just to clear, your themes folder will need to look something like https://skitch.com/willrossi/r4nf4/templates
| 1039 Views | ||
|
Page:
1
|
Go to Top |



