This is an old revision of the document!
This page allows you to edit a template, JS, or CSS file.
If editing a template file, you may have the option to edit the template using the WYSIWYG editor. When doing so we advise to use extreme caution, by backing up the template file before editing (just download the file and save it to your local computer).
Editing using the WYSIWYG editor only affect the parts between the <body> and </body> tags. Anything before the <body> or after the </body> tag is preserved so that you are only modifying those parts of the template file that have less chance of accidental corruption.
Some templates, because of how they are designed, just will not be able to be safely edited by the WYSIWYG editor. When that is the case, when you try to click on the WYSIWYG Editor tab, it will not allow you to.
If you know that a certain template can be "harmed" by the WYSIWYG editor, or perhaps if a template does not contain any parts that are in the <body> section, you can add the following to the template:
{*CODE_ONLY*}
When the above is not displayed at all when the system uses the template, because it is a smarty comment. When it is found in a template that is being edited, the system will not allow that template to be edited by the WYSIWYG editor.
This tab allows you to directly modify the template or file's source code, without it being manipulated by the WYSIWYG editor. When you edit it this way, it is normal to see the HTML tags and such.
This tab will be the only option when you edit JS or CSS files, as there is no way to view or edit such files using the WYSIWYG editor.
These tools are available in both the WYSIWYG Editor and the <..> Source Code Editor.
Use this to download the file. It will allow you to save any current changes if you wish, before downloading the file.
Use this to upload a file from your computer, to replace the contents of the file you are currently editing. Note that this will over-write any current modifications you may have.
This option is only available when editing main template files.
When you click on the 'insert tag' icon, you will see a popup dialog box like the one below. Each tab in the box will show you the available tags that can be inserted into the current template. Use this dialog box to help with inserting modules, addon tags, or "special tags" within the current template. The tag you select will be inserted at the current cursor location within the template file.
This section will only display when editing a template file.
This will list all the current module attachments, addon tag attachments, and sub-template attachments. The attachments displayed do not reflect un-saved changes to the template file! Also, if a template file is altered outside of the admin panel, the attachments are not auto-updated, so this information may be out of date. If you think this is the case, use the Auto-Update Attachments button which will save any current changes to the template, and re-scan the template file for attachments.
This section will only display when editing a template file.
This will list all of the pages this template is attached to, and any other templates that this template is attached to as a sub-template. Remember, the attachments shown only reflect what is found within the Working with Template Set(s).