Every page belonging to a theme has a certain structure. You can use a different structure, but you should probably keep using the one used by the core and almost every marketplace theme. Let's have a look at three different files from a theme. We'll create them on our own in the next chapter. For now, we're just looking at them to help you with reading the code.
There are several numbers shown in the previous illustration, let's have a quick look at them:
This is the page theme template, for example,
full.php
ordefault.php
. It's the file rendered by concrete5, and therefore the one holding everything from the theme together.Each theme template can have a different HTML structure, one might have a single column, another one two and maybe even some dynamic code. In our case, we simple have one content and one area where the user can insert blocks.
This file is called
header.php
and is located in theelements
directory of the theme. It's included by the theme template and...