# Creating Your Own Templates HTML templates are stored in the `templates` subdirectory of the BBP installation folder. The easiest way to create a new template is to copy an existing template directory and modify its files. ## Required Files A template directory must contain at least these three files (where `{ext}` is normally `htm` but can be any extension, including `php` for server-side scripts): | File | Output name | Purpose | | --- | --- | --- | | `index_template.{ext}` | `index.{ext}` | Main index page | | `fullsize_template.{ext}` | `.{ext}` | Individual image pages | | `thumbnail_template.{ext}` | (stored in `body` token) | Thumbnail HTML; concatenated into `body` | Optional additional files: `index2_template.{ext}`, `index3_template.{ext}`; `fullsize2_template.{ext}`, `fullsize3_template.{ext}` (for frames, multi-view, or multilingual templates). Making a template file zero-length suppresses its output. Non-template files in the template directory are copied unchanged to the HTML output folder (useful for logos, button images, backgrounds — see the `icons` template for an example). ## User-Defined Fields (config.dat) Create a `config.dat` file in a `config` subdirectory of the template folder to define up to two additional user-configurable input fields (`user2` and `user3` tokens) in the HTML dialog. Supported input types: - **Dropdown list** (``) — free text field. - **Checkbox** (``) — sets the token to the value when checked, empty string when unchecked. Example `config.dat`: ```xml My custom template Background color: Show EXIF data ``` > **Info** > > If `user2` or `user3` are defined in `config.dat`, the `user1` field is disabled. `user1` is retained only for backwards compatibility. ## Line Endings BBP preserves the line-ending style from the template files. Use Unix-style LF endings in templates intended for Unix/PHP servers to avoid CR-LF issues. --- Source: https://www.breezesoftware.com/help/browser-pro/creating-your-own-templates