## Configuração para estender os templates

### Objectivo

A galeria pode ser personalizada substituindo os ficheiros existindo para outros que foram personalizados. Por exemplo, o header (header.tpl) por ser substituído por outro personalizado (meu-header.tpl). após submeter as modificações na base de dados, a galeria aparecerá com o header personalizado.
as extensões de templates são uma maneira possante de criar temas personalizados. Usado conjuntamente com o Localfiles Editor permite criar novos temas.

### Original Template

A theme contains a number of template files that make up the gallery pages. These are the original templates.

### Optional URL Keyword

These are words found in the gallery URL after the module name. They can also be active permalinks (See the permalink documentation for more information). WARNING: if the same original template and same keyword is used on more than one customised template only the last one is active.

### Bound Theme

The bound theme is the theme from which the template files are being replaced.

### Where are the original templates?

Original templates are the template files shipped with each theme. These are saved in /themes/default/template (or themes/<theme name>/template). These template files should not be edited in place as changes will be lost with theme upgrades.
Supported original templates include:

- index.tpl
- mainpage_categories.tpl and/or thumbnails.tpl
- menubar.tpl
- header.tpl and/or footer.tpl
- picture_content.tpl and/or picture.tpl
- profile.tpl and/or profile_content.tpl
- tags.tpl
- upload.tpl
- about.tpl
- popuphelp.tpl
- search.tpl and/or search_rules.tpl
- nbm.tpl and/or notification.tpl
- identification.tpl and/or register.tpl
- redirect.tpl

### Saving customised templates

Customised templates should be saved in the template-extension folder or subfolders. For example, /template-extension/my-default/header.tpl (or /template-extension//header.tpl) Template files can have any name with a .tpl extension. The template files in subfolders appear in the Template configuration screen as available custom templates.

### Activating customised templates

Select the original template to replace. Optionally choose a URL keyword to ensure that the customised template is only shown on pages with that keyword. Select a bound theme and the changes will be effective on that theme. Submit the changes to the database.

### Deactivating customised templates

Unselect the original template and submit the changes to the database.
Delete the customised template files from the template-extension folder.

### Warnings

- The original template must be the original template otherwise you may have unpredictable results.
- If the same original template and same URL keyword is used on more than one customised template only the last one is active.
- Distributed sample template files are for test purposes only. Do not edit them. Create your own ones or copy existing theme template files into /template-extension//
- When the customised template is deleted the original template file is immediately reactivated.