DemoList your siteSupportBugs reportContact

How can I edit the layout of my Family Tree PHP website?

Family Tree PHP uses the very powerful Smarty template system. With this system almost anything in the look and feel of your Family Tree PHP website is customizable.

You can find the template files in ‘templates/templatename/templates’. These files have ‘.tpl’ as an extension.

In most cases you will be content with editing the CSS style sheets (in the same folder as the tempate files) but if you want to re-order the data on a page or move an element to another place on the site, you have to edit the ‘.tpl’ files. Just open them in a text editor.

The template files contain normal HTML and some Smarty codes. These Smarty codes contain the variables with the data that must be shown and some ‘foreach’ loops and ‘if/else’ clauses. Smarty codes are always between { and }. Variables start with a $ sign. So {$variable} puts the contents of ‘variable’ on the page.

You can find more about Smarty in the Smarty manual.

A list of all variables will be added here in the future, but in the meantime you can just try. It is not difficult. Most variable names will speak for themselves.

A hint before you start editing any files: first copy the template set you want to edit (including the ‘cache’, ‘config’ and ‘templates_c’ subfolders) and save it under a new name (ex. ‘templates/newname/templates’ etc.). Then activate and edit this new template set. In that way you won’t overwrite your changes when uploading an update for the original template set.

If you want to start from scratch with a new template set, the ‘basic’ template set is a good start.

If you have any questions, feel free too ask. I will be glad to help you!

Comments are closed.

© 2009