Changeset 12286 for trunk/language/en_UK/help/extend_for_templates.html
- Timestamp:
- Oct 1, 2011, 9:44:49 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/language/en_UK/help/extend_for_templates.html
r8749 r12286 1 <h2> Extend for templates configuration</h2>1 <h2>Template Extension Configuration</h2> 2 2 3 <h3> Goal</h3>4 <p> Define replacement conditions for each template from template-extension5 (template called "replacer").</p>3 <h3>About</h3> 4 <p>Your Piwigo gallery can be customised by replacing existing template files with customised versions. For example, the default header template (header.tpl) can be replaced by a customised header template (my-header.tpl). After submitting the changes to the database the gallery will display the customised header instead of the original header.<br> 5 Template extensions are a powerful way to create customised themes for both new and advanced users. Used together with the LocalFiles Editor you can create your own child themes.</p> 6 6 7 <p>"original template" from ./themes/default/template (or any other theme) 8 will be replaced by a "replacer" if the replacer is linked to this "original template" 9 (and optionally, when the requested URL contains an "optional URL keyword").</p> 7 <h3>Original Template</h3> 8 <p>A theme contains a number of template files that make up the gallery pages. These are the original templates.</p> 10 9 11 <p>"Optional URL keywords" are those you can find after the module name in URLs.</p> 10 <h3>Optional URL Keyword</h3> 11 <p>These are words found in the gallery URL after the module name. They can also be active permalinks (See the permalink documentation for more information). <a href="#warnings">WARNING:</a> if the same original template and same keyword is used on more than one customised template only the last one is active.</p> 12 12 13 < p>Therefore "Optional URL keywords" can be an active "permalink"14 (see permalinks in our documentation for further explanation).</p>13 <h3>Bound Theme</h3> 14 <p>The bound theme is the theme from which the template files are being replaced.</p> 15 15 16 <p>Read: `<a href="#warnings">Warning</a>` usage conditions.</p> 17 18 <h3>What are template extensions?</h3> 19 20 <p>This configuration tool is powerfull for beginners and advanced users. 21 By FTP, in the template-extension folder, the Webmaster can duplicate a lot of 22 the distributed .tpl files ("original template") with a different name 23 ("replacer"). 24 25 "Original templates", current original supported templates are:</p> 16 <h3>Where are the original templates?</h3> 17 <p>Original templates are the template files shipped with each theme. These are saved in <em>/themes/default/template</em> (or <em>themes/<theme name>/template</em>). These template files should not be edited in place as changes will be lost with theme upgrades.<br> 18 Supported original templates include:</p> 26 19 <ul> 27 20 <li><span class="filename">index.tpl</span></li> … … 41 34 <li><span class="filename">redirect.tpl</span></li> 42 35 </ul> 36 <h3>Saving customised templates</h3> 37 <p>Customised templates should be saved in the template-extension folder or subfolders. For example, <em>/template-extension/my-default/header.tpl</em> (or <em>/template-extension/<my-theme-name>/header.tpl</em>) Template files can have any name with a .tpl extension. The template files in subfolders appear in the Template configuration screen as available custom templates.</p> 38 <h3>Activating customised templates</h3> 39 <p>Select the original template to replace. Optionally choose a URL keyword to ensure that the customised template is only shown on pages with that keyword. Select a bound theme and the changes will be effective on that theme. Submit the changes to the database.</p> 40 <h3>Deactivating customised templates</h3> 41 <p>Unselect the original template and submit the changes to the database.<br> 42 Delete the customised template files from the template-extension folder.</p> 43 43 44 <h3>Where can I find "original templates"?</h3>45 46 <p>Distributed original templates are in /themes/default/template/47 (don't edit them in place for upgrade perspectives). So with "original templates",48 any webmaster can create his "replacers (customized templates)".</p>49 50 <h3>Where should I save "replacers"?</h3>51 52 <p><strong>Replacers (customized templates)</strong> must be placed in the53 template-extension folder (or its subfolders).54 Replacers can have any filename with the .tpl extension. For example: <span55 class="filename">template-extension/my-extension/video.tpl</span>.</p>56 57 58 <h3>How can I activate my "replacers"?</h3>59 <p>An <strong>original template</strong> should be assigned to each60 <strong>replacer (customized templates)</strong> to activate the related replacements.61 This is the goal of "Extend for templates" in the Configuration Administration menu.</p>62 63 <p>If you select an <strong>optional URL keyword</strong> then replacements64 will be operate only on pages with this keyword. For example: <span65 class="pwgScreen">index.php?/<strong>most_visited</strong></span></p>66 67 <p>Advanced users will use permalinks as <strong>optional URL keyword</strong>. </p>68 69 <p>If you select a <strong>Bound template</strong> then replacements will be operate only on this template.</p>70 71 <h3>How can I deactivate my "replacers"?</h3>72 <ul>73 <li>Unselect related "Original templates".</li>74 <li>By FTP delete of "replacers".</li>75 </ul>76 44 <a name="warnings"></a> 77 45 <h3>Warnings</h3> 78 46 <ul> 79 80 <li><strong>Original template</strong> must be the "original" template 81 otherwise you could have unpredictable results!</li> 82 83 <li>On several <strong>replacers (customized templates)</strong> with the 84 same<strong>Original template</strong> and the same <strong>optional URL 85 keyword</strong> only the last replacer is active.</li> 86 87 <li>Unselected <strong>optional URL keyword</strong> will active the replacer 88 on any template usage. As previous point, order can override previous 89 selected replacers.</li> 90 91 <li>Subfolders: 92 Subfolders are ignored but they are usefull to change current order.<br> 93 distributed-samples: for test purpose are distributed! 94 <strong>Don't edit them</strong> create your own ones. 95 </li> 96 97 <li>On delete of a replacer the <strong>Original template</strong> is 98 immediately reactivated.</li> 99 47 <li><strong>The original template</strong> must be the original template otherwise you may have unpredictable results.</li> 48 <li>If the same original template and same URL keyword is used on more than one customised template only the last one is active.</li> 49 <li>Distributed sample template files are for test purposes only. Do not edit them. Create your own ones or copy existing theme template files into <em>/template-extension/<my-theme>/</em></li> 50 <li>When the customised template is deleted the original template file is immediately reactivated.</li> 100 51 </ul>
Note: See TracChangeset
for help on using the changeset viewer.