This wiki covers the many templates used in Hubzilla and Streams. Templates are an integral part of themes, and are used to change the appearance of pages and elements on pages. They contain the HTML use to build different parts of a page. Because Hubzilla and Streams both use the Smarty template system , you don't have to edit the PHP code in most cases.
There are the core templates, theme templates, and templates for widgets, addons, and modules. They are located in different locations.
This wiki discusses what each template does, and then refers you to various repositories for the actual code.
Our list of templates are located here. This also contain some notes on how Neuhub uses these templates in its themes.
It looks for templates in multiple locations, and picks the version in the first location it finds it in. This allows you to override the template used by a widget, module, addon, or core.
Typically, you would place your own version of a template in your theme (or child theme), and it would override all other versions. Just give it the same file name as the original template file.
You can view the actual template files in the repositories, linked below.
It looks for a template in the active theme first.
It should be noted that the Hubzilla version of Redbasic and the Streams version of Redbasic are not the same, despite having the same name. Also, more links will be added here as more themes are released.
If you are using a child theme (also known as a derived theme), it will check to see if there is a version of the template in the parent theme next.
In theory, if you are using a theme derived from Redbasic, it will check Redbasic child theme first, the Redbasic, then the core. But I have been unable to duplicate this with other parent and child themes.
It checks to see if a template is available as part of a widget, module, or addon next.
Notes:
If it cannot find a template in the theme, widget, module, or addon, it tries the core.
The system is set up so that you can override what is inside an existing template without changing an existing template. It does this by looking for templates in multiple locations, and picking which one to use. It uses the first version it finds.
Many templates give you access to variables, such as who is logged in at the moment. You can insert a valid variable into a template with the code {{$variable}} (changing the word "variable" for the name of the variable). You can only used variables that are already defined, otherwise it will give an error.
To find out what variables are available in a template, insert the following code in that template, and then visit any page that uses that template.
{{debug}}
This will cause a popup to appear for anyone who visits the page, showing you the available variables, and the data assigned to them.
As such, it is suggested that you only use {{debug}} on development or testing servers, not production servers.