3.1. Components and minimal requirements of a custom theme


The theme should be in a folder, which has the same name as the theme. E.g. If you name your theme "BlueHope", then all the content files of it should be located in the directory BlueHope.

Actually as a flexibility consideration - if it is not confusing and you think that it is needed, then it is possible, that you include into layout.phtml file such files, which are located outside of the current theme directory.
As a such flexibility example ...
Many themes in Classic Edition themes directory are using CSS or other files from other themes' directories. It is not a big problem in this case, because they are all just part of the Classic Edition and in very rare case someone would like to remove one of these theme directories and still use other such theme directory.
If you wish to develop your theme as a distinct moveable entity, then would be better to keep all files, which this theme is using, inside the same theme's directory.

For installing purposes, there must be a config directory and Install directory in it, and file install-config.php in this Install directory.

Minimal files and directories for a theme called "BlueHope" should be following:

For method theme/choose-default-theme you could also make an image file called screenshot.png

You can make separated directories for CSS and image files and describe path to them in layout.php file - the location of such and any other files is very flexible, as you make it work through layout.php file.

If the logic of making themes seems still confusing, then you could use a theme from the directories
"themes" or "core/themes" as an example or template by making your custom themes (following the GPL license of such a theme of course).

Previous: 3. How to create your own custom themes? | Next: 3.2. The content of file config/Install/install-config.php
Manage themes
1. How to choose a different theme ?
2. How to use a custom theme ?
3. How to create your own custom themes?
3.1. Components and minimal requirements of a custom theme
3.2. The content of file config/Install/install-config.php
3.3. Content of the layout.phtml file
3.4. CSS selectors for custom themes
4. Conclusions about Allmice CMS themes