GiriGiriPHP
home | about | download | how to


Flattr this
How to add a template
templates/ folder in installation root.
Simply, add a new folder with the name of your template, say 'newtemplate', and then drop in your template files there.

Whatever format your page structure uses, drop them into the directory as .tpl files.

Along with the holders for pages that exist in your installation, starting with 'main.tpl' for the main page, 'admin.tpl' for admin page, and whatever pages you have created from your admin menu.
Simply, add a new folder with the name of your template, say 'newtemplate', and then drop in your template files there.

Whatever format your page structure uses (two columns, 3 columns, no columns etc), drop them as pieces into the directory as .tpl files. Actually you can even make them entire pages as a whole.

Along with the holders for pages that exist in your installation, starting with 'main.tpl' for the main page, 'admin.tpl' for admin page, and whatever pages you have created from your admin menu.

Go to the configuration file config.php in includes/ folder, and put in the name of your template in the template variable.

That is all.

The templates for modules are contained in modules themselves. So, you will need to duplicate/select and change what template a module uses, inside that module, in the manner described above. (includes/modules/modulename/templates folder instead of root templates/ folder).