evoSkins are basically collections of template files inside of a skin folder.
This is the organization of templates inside a skin folder.
b2evolution chooses which template to display based on the "payload" requested by the user/web browser through the URL of the current page. Internally, the "payload" type is identified by the variable
$disp (which you can regard as meaning "display" or "dispatch", whichever makes more sense to you).
In some situations you can also see URLs containing a param string like
?disp=users. In this case we specifically request the "users" template. In other cases, the $disp is inferred by the URL; this is notably the case with permalinks for posts which resolve to
$disp='single' by default.
Here are the possible values for
At the very least, a skin folder like
/skins/myskin2 must contain a main template file named
Depending on what b2evo wants to display, it will call a specific "top level" a.k.a. "main" template (
*.main.php) within the skin folder. If the sought template is not found, b2evo will fall back to the default
As previously said, if the sought template is not found, b2evo will fall back to the default
index.main.php template. Thus, the main template is really the only mandatory template for a simple skin.
Many skins only have one main template.
If no main template has been found for a specific display, the default index.main.php will be called. That template will generally include a call to skin_include( ‘$disp$’, … ) which will in turn include a "level 2" a.k.a. "disp" template.
If a specific disp template is not found within the skin directory (for example, if
/skins/myskin2/_msgform.disp.php is not found), then the default disp template from the
/skins directory will be used (in this case,
/skins/_msgform.disp.php would be used).
The main and disp templates above may in turn call include files (
For example, many skins will use a common header and footer for all their templates. These should be in include files named like this:
_html_header.inc.php(contains INvisible common headers, typically the <HEAD> section of the HTML pages)
_body_header.inc.php(contains VISIBLE common headers, typically the top blog banner)
_body_footer.inc.php(contains VISIBLE common footers, typically the bottom credits)
_html_footer.inc.php(contains INvisible common footers, typically logging and debugging code)
If a specific include file is not found within the skin directory (for example
/skins/myskin2/_html_header.inc.php is not found), then the default include from the /skins directory will be used (here
/skins/_html_header.inc.php) would be used.