Themes
Themes let you change the look and feel of a website. Each theme is separate installation package containing complete HTML/CSS/JS code as well as images and other resources. You will learn about the possibilities of creating and customizing themes for your needs.
Theme views, like everything else in the system, use Twig to render content.
Create new theme
Creating a new theme comes down to one command:
$ make console make:theme
During its execution you will have to choose whether you want to do a child-theme,
and specify the name of the theme in the vendor/name
format.
The system will notice the new theme by itself and you will see it immediately in the Administration Panel, and you will be able to activate it.
A new theme will be created in the directory extension/theme/vendor/name
. For example, a theme called
Tulia/Lisa
will be in the extension/theme/Tulia/Lisa
directory.
Views
Theme views are located in the /Resources/views
directory. The main view file that must exist in every
theme is a view called layout.tpl
. It should contain the structure of the HTML document and some
required ones calls that will allow you to attach resources (JS/CSS). This view was created automatically
when creating the theme.
More informations
For more information about the theme's main view, see Main theme's view.
Themes inheritence
Themes can be extended with child themes. They are assigned as children to an existing, full theme. They were created to be able to modify an existing theme without modifying its files directly.
More informations
For more information about theme inheritance, see Themes inheritence.
Customizer
Thanks to the customizer, you can define theme settings. You can give control to the user including texts, colors, photos, etc.
More informations
More information on how to configure the Customizer in the theme, see Customizer.