Effectively Customizing with [INSERTFILE=template]
By Paul
3.67/5 based on 3 votes. The median rating is .
By Paul
Where you have a lot of cutom content to insert in a template, move the custom html in a new template in your /custom subdirectory. Then, where you want the html to be inserted in the regular template, insert this code in the place where you formerly had all of the html:
[INSERTFILE=yourtemplatename]
This will cause all of the contents of the custom template yourtemplatename.tpl from the 'custom' subdirectory of your templates directory to be inserted at that spot. This works in all templates.
At least this way, when upgrade instructions state that you need to overwrite that template you can quickly search for each instance of yourtemplatename.tpl in the old verson to know where you made the insertion, and thus port it into the new version. It will serve as a clear marker of what parts of the template were your custom parts compared to which parts were standard, and this should eliminate the biggest headache of updating a template. You won't be overwriting anything in the custom/ subdirectory on upgrades so your custom content will still be there and all you need to do is add the little insertion lines back in to call it.
[INSERTFILE=yourtemplatename]
This will cause all of the contents of the custom template yourtemplatename.tpl from the 'custom' subdirectory of your templates directory to be inserted at that spot. This works in all templates.
At least this way, when upgrade instructions state that you need to overwrite that template you can quickly search for each instance of yourtemplatename.tpl in the old verson to know where you made the insertion, and thus port it into the new version. It will serve as a clear marker of what parts of the template were your custom parts compared to which parts were standard, and this should eliminate the biggest headache of updating a template. You won't be overwriting anything in the custom/ subdirectory on upgrades so your custom content will still be there and all you need to do is add the little insertion lines back in to call it.
Rating:
3.67/5 based on 3 votes. The median rating is .
Submitted: 09/25/03 (Edited 08/15/04)
Description: Keeping your changes separate from the main templates.
Views:
1714 views. Averaging 1 per day.
In the most recent 30 day period, there've been 0 views.

Print
E-Mail