Differences

This shows you the differences between two versions of the page.

Link to this comparison view

2.0:resources:themes:inheritance [2013/10/16 09:55]
127.0.0.1 external edit
2.0:resources:themes:inheritance [2018/04/29 11:02] (current)
philippe [Principle] Replace default theme by templates sets
Line 3: Line 3:
 ===== Principle ===== ===== Principle =====
  
-In Dotclear, ​all the themes inherit from the "default" ​theme. If a theme does not provide specific versions of template files like ''​home.html'',​ ''​post.html'',​ ''​category.html''​ or others, Dotclear 2 will use the files available in the "​default"​ theme to render the pages.+In Dotclear, themes inherit from one of 3 templates sets : mustek (used by default ​if the theme does not specify which set it inherits from), currywurst or dotty. If a theme does not provide specific versions of template files like ''​home.html'',​ ''​post.html'',​ ''​category.html''​ or others, Dotclear 2 will use the files available in the template set to render the pages.
  
 Since Dotclear 2.1, you can specify what theme is the parent of another theme. A theme will be called //child// when it //​inherits//​ from a //parent// theme. The child theme can use the template files from the parent theme, thus avoiding to duplicate all the tpl files. Since Dotclear 2.1, you can specify what theme is the parent of another theme. A theme will be called //child// when it //​inherits//​ from a //parent// theme. The child theme can use the template files from the parent theme, thus avoiding to duplicate all the tpl files.
Line 14: Line 14:
 This will allow you to use new [[..:​tpl|template tags]] and new URL managers in the child theme. This will allow you to use new [[..:​tpl|template tags]] and new URL managers in the child theme.
  
-Ordre de recherche d'un fichier template lors du rendu : 
 Search order of a template file when rendering: Search order of a template file when rendering:
  
Line 20: Line 19:
   - Else, if the parent theme has the requested file, this one will be used.   - Else, if the parent theme has the requested file, this one will be used.
   - If none of the above, Dotclear 2.x will do the usual search:   - If none of the above, Dotclear 2.x will do the usual search:
-    - first in the default theme ("​default"​),+    - first in the templates set,
     - then in all other paths that might have been added by plug-ins.     - then in all other paths that might have been added by plug-ins.
  

Wiki powered by Dokuwiki.