This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorials:design_adv:replace_addon_templates [2014/09/25 16:55] 127.0.0.1 external edit |
tutorials:design_adv:replace_addon_templates [2014/09/30 17:37] (current) geojames |
||
---|---|---|---|
Line 2: | Line 2: | ||
====== Customizing Addon Templates ====== | ====== Customizing Addon Templates ====== | ||
- | This tutorial will walk you through all the steps necessary to customize Addon template file(s), without touching the original template files in the addon' | + | This support wiki article has been [[startup_tutorial_and_checklist:design_configuration:design_tools:system_template_changes:addon_changes|moved here in the support |
- | + | ||
- | <tip c w> | + | |
- | + | ||
- | Before attempting to make changes as described here, be sure you have a **firm grasp of [[tutorials/ | + | |
- | + | ||
- | Addon templates, by their very nature, are very dynamic and closely related with their PHP file counterparts. | + | |
- | + | ||
- | **Risks of Customizing System, Module, or Addon Templates:** | + | |
- | * May require **compatibility changes when updating the addon**. Such changes are the responsibility of the site owner and are not covered by the software update service provided by Geodesic Solutions. | + | |
- | * Problems caused by customizations to Geodesic Addon templates are **not covered by Geo support**, if support finds that something works with the " | + | |
- | + | ||
- | </ | + | |
- | + | ||
- | ===== What you need ===== | + | |
- | **Skills** | + | |
- | * Basic understanding of how HTML, Smarty Templates, and/or PHP works will help. < | + | |
- | * Not afraid to learn new things. ;-) < | + | |
- | + | ||
- | + | ||
- | **Handy tools when editing template files:** | + | |
- | * [[http:// | + | |
- | + | ||
- | + | ||
- | ===== Getting Started - Copying Files to Customize ===== | + | |
- | + | ||
- | Note that by //addon template//, we mean any template used by an addon, one that is found in the addon' | + | |
- | + | ||
- | Use the following instructions to modify 1 (or more) addon templates. | + | |
- | + | ||
- | - In your Geo admin, and in this user manual, check to see if what you are attempting to accomplish can already be done by changing settings in the admin. | + | |
- | - In the admin panel, go to the page **[[/ | + | |
- | - In the top right corner of the page, make sure you are in **Advanced Mode**. | + | |
- | - On the page, make sure the settings are set as follows: | + | |
- | * Next to // | + | |
- | * Next to //default// - checkbox for admin editing is checked.((For the default template set, checking the box for Admin Editing just allows you to view files in read-only mode for the default template set, you will never be able to edit default templates from the admin panel as you should not be editing files in the default template set. (Edit them in your own template set instead.) )) < | + | |
- | * In **Advanced Settings**, check the box next to the setting **Allow Edit of system, module, and addon Templates**. < | + | |
- | < | + | |
- | - Save the changes. < | + | |
- | - In the admin, go to the page **[[/ | + | |
- | - In the manager, browse to the sub-folder within the default template set, that contains the file you wish to customize. | + | |
- | <tip c n> | + | |
- | - Check the box next to the file(s) you wish to modify so that it is selected. | + | |
- | - On the bottom of the manager window, click the link to **copy** the file. After you click it, the file(s) that were selected should appear in the **File Clipboard** below the manager, make sure that it lists the correct template file(s). < | + | |
- | - On the left side of the manager, click on the Jump To link to go to the **Base Folder**. < | + | |
- | - In the manager, click on the **my_templates** folder so that you are viewing the files within that template set. < | + | |
- | - On the bottom of the manager, click the link to **paste** the file(s). | + | |
- | - Repeat the copy for any other templates you may want to customize, for instance if you also planned to modify the item.tpl file. Note that you should not copy a file unless you plan to customize it. You do not need to worry if the file you are customizing includes another template file, if you do not copy that template file, when it is included the system will automatically look for the file in the default template set if it is not found in my_templates. | + | |
- | <tip c w> | + | |
- | + | ||
- | For addons created by Geodesic Solutions, be sure to keep the part at the top of the file that looks like **{* $Rev: 12345$ *}** - when you update you will be able to compare this " | + | |
- | < | + | |
- | - Make changes to the file(s) in **geo_templates/ | + | |
- | + | ||
- | ===== How Addon Templates Work ===== | + | |
- | + | ||
- | There are a few things you should know about how addon templates work within the system, as noted below. | + | |
- | + | ||
- | ==== Template Files Copied during Addon Install/ | + | |
- | + | ||
- | When an addon is installed or updated, the system checks to see if that addon has any templates in the addon folder, in the sub-folder **templates/ | + | |
- | + | ||
- | The following sub-folders are " | + | |
- | - **admin/** - If this folder exists, it is not copied over as it is assumed to be used for pages in the admin, which are rarely customized. < | + | |
- | - **main_page/ | + | |
- | - **external/ | + | |
- | + | ||
- | + | ||