This page is dedicated to themes customization or themes creation. If you are looking for existing themes, refer to the documentation Blog look.
Each theme is a set of files stored in a subdirectory of /themes on your Dotclear installation. Once interpreted by the template engine, those files will produce the HTML pages on the public side of your blog. Please find below details of the various files.
The file named _define.php hosts the theme name, description, author and version number. It should preferably be written in english.
<?php if (!defined('DC_RC_PATH')) { return; } $this->registerModule( /* Name */ "My Beautiful Theme", /* Description*/ "Two columns theme", /* Author */ "annso", /* Version */ '1.0', ); ?>
Fields of the function registerModule are commented in order to facilitate the understanding of this file. They are quite easy to understand so we will not explain them further.
If the theme directory contains a file called screenshot.jpg, this image will be displayed on the theme selection page. It provides an overview of the theme. The image must be 280 pixels wide and 245 pixels high.
These files are stored in a subdirectory tpl in the theme folder.
Note:
Some themes, created before Dotclear RC1, may not follow that organization. just create the directory tpl and move the HTML files into it in order for the theme to work properly.They will be used in the context of the page displayed:
When a plugin creates another context, it must provide its own HTML file. This is the case, for example, of the dayMode and contactMe plugins.
Some elements are recurring, in order to reuse them in every contextn they are created once and for all. These are the files whose name begins with an underscore, such as _footer.html.
Tip:
A specific class is assigned to the <body> html tag for each context file and you can therefore change very easily how a specific context looks using this class.Tip:
You can always remove the call to an included file for a said context, then you can create a specific content for that context only. You may also create a _foobar.html or anything else that would suit your recurrent needs.Dotclear will try to find the file it needs in the theme folder. If it does not exist there, it will be read from the default theme.
Note:
There is the specific case of the Atom & RSS feed templates. They are located in the/dotclear/inc/public/default-templates/
folder. You can customize those ones also by placing your own version in your theme's tpl folder.
So bear in mind that:
Beside the well known xhtml tags, Dotclear template files use a specific syntax to call its own fuctions or display informations. Those tags and their attributes are listed and explained in this section. How to create your own template tags is explained in that other section.