Development
Templates
General
VideoDB uses the Smarty Template engine. Thus everybody interested in writing his own templates should have a look at the Smarty Documentation
What follows is a list of all templates used by VideoDB and the variables assigned to them. Of course you can split your templates by using Smarty's {include}
statement.
All Templates
The following variables are available in all templates:
name | type | description |
---|---|---|
$lang | associative array | Contains all language specific strings for the current language. Have a look at the files in the language directory for available keys. |
$config | associative array | All config options as set in the Configuration Screen |
header.tpl
This template is included at the top of every page and should set up the needed HTML headers and include the stylesheet
name | type | description |
---|---|---|
$header | associative array | Contains the URLs for the top navigation. The available keys are: browse, random, search, stats, new, setup, edit, view, del, borrow, imdbBrowser, help . You should check if the key is empty and only display a link when an URL was given. |
$style | string | Deprecated - use $config.style instead. |
$langcode | string | Deprecated - use $config.language instead. |
$localnet | boolean | True if VideoDB is accessed from the localnet else false. |
footer.tpl
The footer is included at the bottom of every page
filter.tpl
This template displays the row of available filters in the browsing view.
name | type | description |
---|---|---|
$filters | associative array | Contains all available filters as keys and their Names (translations) as values |
$filter | string | The currently selected filter in the browsing view |
$showtv | boolean | True if TV-Episodes are to be shown else false. |
$listcolumns | integer | This is currently only used in the modern template and determines how many columns are to be used in the browsing view. |
browse.tpl
name | type | description |
---|---|---|
$ |
Needs to be continued...