# Editing templates

You can see a full list of available templates by browsing the directory TreeView. When you select a template, XOOPS will open it in an editor where you can edit it.

While editing templates you must enable a preference that automatically updates module template .html files if there are newer files under the themes/your theme/templates directory for the current theme (System Module -> Preferences -> General Settings -> Update module template .html files from themes/your theme/templates directory? -> ‘Yes’). This should be turned off once the site goes public.

If you accidentally mess up a template don’t forget that you can retrieve a ‘good’ copy from the default template set. If you are working with non-standard templates it may be a good idea to save a copy to disk before you start modifying them. Let’s modify one of the templates coming with the XOOPS Poll module. To do so, let’s select the theme we want to modify the templates for (here: Zetagenesis):

![img\_105.jpg](https://2147665475-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LD6Mk8lR9tTgd-Sz24m%2F-LD6MxJo_T9yuWDppWVP%2F-LD6N-fqB5-ZBFpUSk1Y%2Fimg_105.jpg?generation=1526984618150373\&alt=media)

As next, let’s select few of the XOOPS Poll templates:

![img\_104.jpg](https://2147665475-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LD6Mk8lR9tTgd-Sz24m%2F-LD6MxJo_T9yuWDppWVP%2F-LD6N-fs0qVtZGcENm__%2Fimg_106.jpg?generation=1526984614367510\&alt=media)

When we click on submit, the original templates from the module are copied to the theme directory:

![img\_104.jpg](https://2147665475-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LD6Mk8lR9tTgd-Sz24m%2F-LD6MxJo_T9yuWDppWVP%2F-LD6N-fuv9Ug9SabQk1H%2Fimg_107.jpg?generation=1526984609367724\&alt=media)

Now selecting in the TreeView the Zetagenesis theme and XoopsPool in the modules directory, we can see the templates which can then be directly modified in an editor:

![img\_104.jpg](https://2147665475-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LD6Mk8lR9tTgd-Sz24m%2F-LD6MxJo_T9yuWDppWVP%2F-LD6N-fwSt3CY3Jmu7Do%2Fimg_108.jpg?generation=1526984609440040\&alt=media)

_**Figure 22 Editing Template File**_

The ‘submit’ button will save any changes you have made to the template.
