Introduction
Jomres uses templates to define layout of pages in the system. This allows us to separate PHP code from the html required to build a page, making it easier for non-developers to customise a page to suit their own tastes.
Jomres offers you the ability to edit guest facing templates via the template editing feature in the administrator area of Jomres. This feature saves your customised templates to the database, meaning that in the event of an upgrade, your customisations are retained, however this can also bring it's own problems.
We are constantly adding new features and functionality to Jomres, but this inevitably means that we need to change the templates in the core package of Jomres. It's not unusual for new functionality to render older templates non-functional in the newest version of Jomres.
How do you know if one of your templates needs updating?
If you view the
Template Editing page in the administrator area of Jomres you'll see a list of template files that you can edit. If you're reading this article then you'll already know that by clicking on the link for a template you'll be taken to a page that allows you to edit that template's html.
The Template Editing feature does not modify a file on disk, instead it saves changes to the database. This is useful because if you've made a series of changes and made a complete mess of things you can use the Waste-basket/Delete icon to remove your changes from the database, and then Jomres will use the unaltered file on disk. At this point you can start editing again.
This page has a number of column headings : ''Template Name, Template has been customised?, Disk template Last edited, Database template Last edited, Database template warning''.
Aside from the Template Name, these rows will indicate when a template was last edited via the template editing feature, the file on the server's disk's last modification date and if the template file on disk's last modified date is newer than the one in the database it'll trigger a warning. Whether or not you act on that warning is largely up to you.
It's possible that some of our changes are purely cosmetic and your customisations have no impact on your site, however it's also possible that some of our changes have meant that your version of the template is no longer working (E.G. some data doesn't show or JavaScript errors are created because we've changed the variables in the system or how they're used).
How do I fix errors?
There are two ways you can fix errors. Which way you choose depends on how many changes you made to the original template. If you only made a few changes then possibly the best approach would be to click on the template's name in the template editing feature and use the Wastebasket/Delete icon. This will remove the customised template from your database and cause Jomres to use the newer version stored on the server's hard disk.
If, however, you made a lot of changes to the template and don't want to just throw them all away, you will need to analyse your customised template and compare your version to the newer Jomres template. This isn't the place to discuss methods in any detail as it depends on how you do your own edits, but let's say for example that you use a program like Dreamweaver. If you do, then the first thing you'd need to do is download (via FTP) the newest version of the template from the /jomres/templates/jomres/frontend to your desktop and open that in Dreamweaver. You'd then open a new window in Dreamweaver and copy your customised template (from the Jomres -> Template Editing -> click on a template name to see it's layout page) from the template edit page and paste that into your new window. You can then analyse the new changes and compare them to your existing template and make any required changes before pasting them back into the Template Editing page and clicking Submit to save the changes.
Can I stop this from happening again?
Not really, no. If you want to edit your layout (and we encourage you to do that if that's appropriate for you) then it's inevitable that there will be some conflict with future versions of Jomres. Whilst we would prefer to not edit a template due to the number of support requests it's change will bring when a new version is released, we are also unwilling to refuse to make changes if they will benefit the system. This would effectively bring new development to Jomres to a halt and we're not prepared to do that.