User Tools

Site Tools


admin_menu:design:template_sets:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
admin_menu:design:template_sets:start [2011/03/04 20:55]
jonyo [Use Google Libraries API]
admin_menu:design:template_sets:start [2021/11/10 19:32] (current)
jonyo replace <tip> with <note>
Line 13: Line 13:
 {{ :admin_menu:design:template_sets:template-sets-normal.png |Template Sets}} {{ :admin_menu:design:template_sets:template-sets-normal.png |Template Sets}}
  
-===== What is a Template Set? ===== 
- 
-A template set can be thought of as a "theme" or a "skin" for the site.  You can switch between what template set (or even multiple template sets) are used just by "flipping a switch" in the admin panel.  You can create one from scratch, start from the default ones that go with the software, or even upload a template set that a 3rd party designer creates for use with the Geo software.  Once you create your template set, you can easily transfer it to other installations, or if you are a designer, can sell your custom templates. 
- 
-**For a more advanced explanation:** 
- 
-A template set is a sub-folder in the **geo_templates/** folder.  A template set can have file templates, media files((Such as images, CSS or JS files that are used within the templates in that //template set//)), and PHP files that store different aspects of the design, such as what template is attached to what page in the software((Note that the PHP files are handled by the admin panel, you only need to set the settings like you like (such as what template is used for what page), and the admin panel will make any needed changes to the PHP files for you.)). 
- 
-A template set can easily be backed up (just download it using the download button!) or restored (just upload the template set file using the upload button!).  It can also be easily copied from one site to another((Just download it from one site, then upload it to another site!)), and the design will be kept intact, with no changes needed in the admin panel besides "activating" the template set. 
- 
-The templates are broken up into 5 main sub-folders, each for it's own type of files: 
-  * //main_page/// folder : Main Page Templates:  These templates are used for the "overall" templates and sub-templates used for each page. 
-  * //external/// folder : Media Files: These are CSS files, JS File, and images that are referenced from the main page templates.  Sometimes CSS or JS files here will be used by modules or system templates, especially with highly dynamic parts of system or module templates. 
-  * //module/// folder((These templates are highly dynamic, and will usually need updates to them after each software update.  You should not customize templates here unless there is no other way to do it, and be aware that customizations will make software updates much more difficult.)) : Module Templates : These are template files that are responsible for displaying each of the modules within the system.  The template file name will correspond with the tag name used to display that module within a main page template. 
-  * //system/// folder((These templates are highly dynamic, and will usually need updates to them after each software update.  You should not customize templates here unless there is no other way to do it, and be aware that customizations will make software updates much more difficult.)) : System Templates : These are template files that display the dynamic part of each page, it is what replaces the **{body_html}** tag within the main page templates.  For instance, if viewing the login page, the system template will display the login box part of the page. 
-  * //addon/// folder : Addon Templates : Not normally found in a template set, these template files would replace same-named template files within the addon's templates folder.  Changes may be required after updating an addon. 
- 
-You can find more information on the tools that are available to use on template sets, in the documentation on this page. 
  
 ===== Template Sets Columns ===== ===== Template Sets Columns =====
Line 48: Line 30:
 When changing things in the admin panel, it will never allow changes to be made to any templates or media files that are not in the selected template set(s) currently selected for "admin editing". When changing things in the admin panel, it will never allow changes to be made to any templates or media files that are not in the selected template set(s) currently selected for "admin editing".
  
-<tip c n>**Tip:** If you are working on a new design, change **Admin Editing** selection to the template set for the new design.  That way you won't ever accidentally affect the current design while working on a new one!</tip>+<note tip>**Tip:** If you are working on a new design, change **Admin Editing** selection to the template set for the new design.  That way you won't ever accidentally affect the current design while working on a new one!</note>
  
 ==== Template Seek Order ==== ==== Template Seek Order ====
Line 56: Line 38:
 The **default** template set will always be the last template set among the active template sets, you will not be able to change the seek order of the default template set.  This is because the default template set will be the last place the system tries to look for a template. The **default** template set will always be the last template set among the active template sets, you will not be able to change the seek order of the default template set.  This is because the default template set will be the last place the system tries to look for a template.
  
-For more info on why the seek order is so important, read over the [[#How a template set is chosen]] section below. +For more info on why the seek order is so important, read over the [[startup_tutorial_and_checklist:design_configuration:design_tools:design_template_sets:how_template_set_chosen|]] page.
 ==== Template Set Name ==== ==== Template Set Name ====
  
 This will be the //name// of the template set, which is the folder name for that template set. This will be the //name// of the template set, which is the folder name for that template set.
 +
 +==== Language ====
 +
 +This allows you to attach a template set to a specific language.  Think of this as attaching a template to a language, you do **not** need to set the language for every template set!  If you only have one language, keep that drop-down set to "any language".
 +
 +**Tip:** Set your "main" template set (usually this is my_templates) to "any language" so that it will never fall through to use the default design (with the default logo and all).
 +
 +==== Device ====
 +
 +This column **Added in version 7.3.0**
 +
 +This is similar to the languages column, except instead of loading based on the language, it loads based on what device is detected.  Usually you will set all of your templates to "any device" As with the language selection, treat this as attaching a template set to a device, you will usually want to use "any device" unless certain templates should only load for mobile.
 +
 +<note>**Note:**  The default design (as of version 7.3.0) uses what is called Responsive Web Design (RWD).  This technique allows the same templates to be used for all devices, and it //responds// to the device's screen size by adjusting the layout of the page.  Because of this, using mobile-only templates are not needed.  We still added the ability to use mobile templates if you wish to give you the choice to use whatever techniques you want for your site.  See the [[designers:philosophy|Design Philosophy]] page for a more in-depth explanation.</note>
  
 ===== Template Set Buttons ===== ===== Template Set Buttons =====
Line 93: Line 88:
  
 ==== Download ==== ==== Download ====
-<tip c n>**Note:** The download functionality requires the server to have **Zip support** installed for PHP.  If your site does not have this requirement, it will say so in the dialog.</tip>+<note>**Note:** The download functionality requires the server to have **Zip support** installed for PHP.  If your site does not have this requirement, it will say so in the dialog.</note>
  
 This button will open a dialog similar to the one displayed below, to allow downloading the entire template set for backup or portability purposes. This button will open a dialog similar to the one displayed below, to allow downloading the entire template set for backup or portability purposes.
Line 120: Line 115:
 Note that if you edit a template using the admin panel, or even upload a file using the admin panel, it will do the re-scan of the attachments for that file automatically.  You will only need to use this button if you have made template changes outside of the admin panel. Note that if you edit a template using the admin panel, or even upload a file using the admin panel, it will do the re-scan of the attachments for that file automatically.  You will only need to use this button if you have made template changes outside of the admin panel.
  
-<tip c n>**Tip:**  If a module or addon tag's contents is not displaying, use the re-scan tool to re-generate the attachment files for the template set.</tip>+<note tip>**Tip:**  If a module or addon tag's contents is not displaying, use the re-scan tool to re-generate the attachment files for the template set.</note>
  
-=== Re-Scaning Default Templates ===+=== Re-Scanning Default Templates ===
 **Never edit the default template set!**  See [[admin_menu/design/start#Default Template Set - do not change!]] for more info on why. **Never edit the default template set!**  See [[admin_menu/design/start#Default Template Set - do not change!]] for more info on why.
  
Line 140: Line 135:
 Using this tool will allow you to import text changes that are **recommended by the template designer**, for a template set to display as intended.  Such text changes usually involve when there are HTML directly in the text, usually images that are part of language text entries. Using this tool will allow you to import text changes that are **recommended by the template designer**, for a template set to display as intended.  Such text changes usually involve when there are HTML directly in the text, usually images that are part of language text entries.
  
-<tip c h>**Tip:**  Template Designers - If you need a certain text entry or entries to be altered for your design to display as intended, you can create your own text import file.  The format is exactly the same as is used for the main text import/export routines, you only need to include rows for text entries that need to be changed.  To use it, just include the text.csv file in the main folder for your template set.</tip>+<note tip>**Tip:**  Template Designers - If you need a certain text entry or entries to be altered for your design to display as intended, you can create your own text import file.  The format is exactly the same as is used for the main text import/export routines, you only need to include rows for text entries that need to be changed.  To use it, just include the text.csv file in the main folder for your template set.</note>
  
 The fields in the dialog are explained in more details below: The fields in the dialog are explained in more details below:
Line 168: Line 163:
 ===== Upload Template Set ===== ===== Upload Template Set =====
  
-<tip c n>**Note:** The upload functionality requires the server to have **Zip support** installed for PHP.  If your site does not have this requirement, it will say so in the dialog.</tip>+<note>**Note:** The upload functionality requires the server to have **Zip support** installed for PHP.  If your site does not have this requirement, it will say so in the dialog.</note>
  
 Use the upload template set button that is below the list of template sets, to upload a template set from a 3rd party template designer, or to restore a template set previously downloaded for backup purposes.  The dialog will look similar to below: Use the upload template set button that is below the list of template sets, to upload a template set from a 3rd party template designer, or to restore a template set previously downloaded for backup purposes.  The dialog will look similar to below:
Line 195: Line 190:
 If a particular template or file exists in more than one of the selected template sets, the one that is used is the one that would have been chosen by the template system, or the one that is in the template set "higher up" in the **Template Seek Order**. If a particular template or file exists in more than one of the selected template sets, the one that is used is the one that would have been chosen by the template system, or the one that is in the template set "higher up" in the **Template Seek Order**.
  
-<tip c n>**Tip:**  The **Merge Sets Together** button is a handy tool if you currently have your templates scattered across a few different template sets, and you want to combine them into one single template set!</tip>+<note tip>**Tip:**  The **Merge Sets Together** button is a handy tool if you currently have your templates scattered across a few different template sets, and you want to combine them into one single template set!</note>
  
 See below for more information on each field within the dialog. See below for more information on each field within the dialog.
Line 205: Line 200:
 **What template types:**  Check the box next to each “template type” (in other words, the direct sub-folders for each template set). It is recommended to only copy main_page and external (the ones checked by default).  Keep in mind that every **system/**, **module/** or **addon/** file that exists in a template set, may require changes when you update the software to a newer version, so only use such files in a template set that you intent to customize. **What template types:**  Check the box next to each “template type” (in other words, the direct sub-folders for each template set). It is recommended to only copy main_page and external (the ones checked by default).  Keep in mind that every **system/**, **module/** or **addon/** file that exists in a template set, may require changes when you update the software to a newer version, so only use such files in a template set that you intent to customize.
  
-====== Advanced Settings ======+===== Create Main Template Set =====
  
-This section displays advanced settings, most of which will only display when in **advanced mode**.  See the sub-sections below for an explanation of each setting.+Use this button to create your main template set based off of the current default templates.  **Always** use this when you are creating a new template set that you want to start from the default templates, you should **never** make a copy of the default templates directly!
  
-===== Use Google Libraries API =====+This tool will copy over the main_page templates, along with external folder with images and such, and create a custom.css file for you to add your custom CSS to.  It only copies the templates and media files that are "safe" to have a copy of, it does not copy system or module templates for example.  The files that it does not copy, are because those are templates that are used directly by the software, and are very likely to change in new versions.  If you have a copy of such files in your own templates, you must apply changes every time you update or it may break things in the software.
  
-This setting **Added in 6.0.0**.+As long as you use this tool to update the software, future updates should be relatively smooth That is the main purpose of this tool, to make sure the template set is update friendly.
  
-Using this feature allows certain JS libraries to be loaded from the Google Libraries API instead of loading them from your local site.  This provides 2 main advantages: +Use of the "create main template set" button is not recommended for creating copies of the working template sets if your site design is based on one of the secondary template sets available from our site like the tempo, marquee or fusion template sets.  If you working template design is based on the tempo, fusion or marquee designs and you wish to make copy of the working template design (possibly for versioning purposesor you wish to leave the original state of the working template set for "return to starting point" reasons you should use the "copy" feature next to that template set within the DESIGN > TEMPLATE SETS admin tool.  This will copy all files in that template set to a new template set to begin work on. 
-  * Google Libraries API uses compression by default, so that the file downloaded is much smaller than if no compression was used.  This makes the page load that much faster. +====== Advanced Settings ======
-  * Since it loads off of a common location (from Google's site), if the user has ever visited any site that uses the same library, they will already have the files in the browser cache, in which case it will not need to download anything!+
  
-Note that this only uses Google Libraries API for the //client side//((what you see when you click **My Site** from the admin panel)), the admin will always load the JS libraries "locally".  This is done in case the Google API key entered is invalid, you will still be able to use the admin panel (and be able to enter the correct key). +This entire section has been moved to [[admin_menu/design/settings/start#Advanced Settings|Design > Settings]] in version 7.3.0refer to that page for information about each setting that used to be on this page.
- +
-[[http://code.google.com/apis/libraries/devguide.html|More Technical Info Here]] +
- +
-**Google API Key:**  You must sign up for a Google API key to be able to use the Google Libraries API feature, that way Google can contact you if something is wrong The signup is freeand only requires you to enter the website the key will be used on.  See the documentation on the signup page for help filling it out. +
- +
-[[http://code.google.com/apis/loader/signup.html|Free Sign-up for Google API Key]] +
- +
-Note that this Google API Key is **the same one used for Google Maps Addon**, if you have that addon and are updated to at least **1.0.8**, it will share the same setting value for the Google API Key. +
-===== CHMOD 777 Files ===== +
- +
-Leave this box **checked** if you are not sure if you need it. +
- +
-If this setting is turned on, any file operations made to files and folders within geo_templates/ folder, will be CHMOD to 777. This is necessary on some servers in order to be able to edit and over-write the file or folder using FTP, if you wish to edit the design by editing the files directly instead of through the admin panel, or if you ever wish to delete the files using FTP. +
- +
-If this is not turned on, the file permissions will be set at whatever the default is for your server's configurationOn some servers, this may result in not being able to view, edit, or delete the file using FTP since the “apache user” is usually different than the “FTP user”. +
- +
-Note that this setting takes effect even if in **Standard Mode**, and it defaults to be checked (turned on). +
- +
-===== Allow Edit of system, module, and addon Templates ===== +
-If this setting is checked (turned on), in the admin panel, it will allow editing of system, module, and addon templates.  Normally such editing is not allowed in the admin panel, since editing such files is not usually needed, and can make updates much more difficult. +
- +
-Note that this setting **ONLY** has an effect when in **Advanced Mode**, and it defaults to be un-checked (turned off). +
- +
-<tip c w>**Warning:** For your convenience, system, module, and addon templates can be edited in the admin panel when in advanced mode, and the setting is enabled in the advanced settings, but there are risks in customizing such templates, as noted below. +
- +
-**Risks of Customizing System, Module, or Addon Templates:** +
-  * May require compatibility changes when updating the software. 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 are not covered by Geo support, if support finds that something works with the "default" templates but not with customized templates, they will not be able to help further. +
- +
-</tip>+
  
 ====== Default Template Set - do not change! ====== ====== Default Template Set - do not change! ======
Line 253: Line 217:
 We can't stress this enough, you should never edit any files in the default template set directly. We can't stress this enough, you should never edit any files in the default template set directly.
  
-**[[admin_menu/design/start#default_template_set_-_do_not_change|See Here for more info]]**+**[[startup_tutorial_and_checklist:design_configuration:design_tools:design_template_sets:do_not_change_default_template_set|See Here for more info]]** 
  
  
-====== How a template set is chosen ====== 
  
-The template system uses a //**Cascading Template Set**//((Yes that term was invented by us specifically for describing the way this software works.  If you see that term used anywhere else, they got it from us.8-))) model.  When the system is looking for a template to load, it looks through all of the active template sets, in the order the template sets appear in the admin.  You can change that order by clicking on the up and down buttons in the //Template Seek Order// column.  This allows you to use a collection of "partial" template sets.+===== Specify the template set =====
  
-For a scenario where this might be useful Say you have a partial template set that might contain "seasonal" alterations to images and the main CSS file No changes to your main templates are needed, it's mainly to change the look of it During the season, you would activate the template set, and move it to be at the top of the template seek order.  Now when the system is looking up the location for any of the images or the CSS file, it would find the files in the seasonal template set, and use those instead of your main ones.  For the files it does not find in the seasonal template set (like all the main templates) it would find them further down in another template set that is lower in the "template seek order" Once that season is overto go back to using the normal images and CSS file, just de-activate the seasonal template set It can be a little confusing at first, but once you get a hang of how it works it gives you a lot of control and power to do a lot of things you would not be able to do as easily with a traditional template system.+NoteThe functionality noted below was added in **version 6.0.0**prior versions this will not work and will either "not do anything" or will cause a template error.  The template set loading system itself has been in the software for much longerbut this specific functionality noted below requires at least 6.0.0.
  
-For more technical illustration of how particular template from particular template set is loadedread on.+When you are specifying **template resource**, for instance when using the //{include}// tag to include a template set, or //{external}// to get the location of a template set:  There is special syntax that is supported, that will **force using a specific template set**.  This is to simulate the functionality built into Smarty itselfthat allows including a template resource from a specific template folder.  [[http://www.smarty.net/docs/en/resources.tpl|More info on that here - see section "Specifying the $template_dir to use"]].
  
-For the purposes of this explanationwe'll assume the following file structure exists inside geo_templates/ :+To specify the template set to load the template resource fromand bypass the normal behavior outlined in [[startup_tutorial_and_checklist:design_configuration:design_tools:design_template_sets:how_template_set_chosen|]], include the template set folder name in square brackets before the name of the template.  See the example below:
  
-Contents of **geo_templates/**: +<code>[template_set_name]file_name.tpl</code>
-  * **blufyre_startrek/**  [(made-up) Template set distributed by a 3rd party] +
-    * **main_page/** +
-      * [Full "main body" template set, with it's own template to page attachments and everything] +
-    * **text.csv** [Text import file with recommended text changes] +
-  * **customized_search/** [We made a separate template set for 1 template file, to make troubleshooting that one file much easier] +
-    * **system/** +
-      * **search_class/** +
-        * **details_form.tpl**  [Customized search form template] +
-  * **default/** +
-    * **addon/**  (contains various addon templates) +
-    * **external/** +
-      * [Contains un-altered media files (images,css,js) that are used in templates] +
-    * **main_page/** +
-      * [Contains ALL overall templates and sub-templates, un-altered] +
-    * **module/** +
-      * [Contains ALL module templates, un-altered] +
-    * **system/** +
-      * [Contains ALL system templates, un-altered] +
-  * **my_templates/**  [Template set containing misc. templates that are modified]] +
-    * **module/** +
-      * **module_zip_filter_1.tpl** [Modified zip filter module template] +
-  * **t_sets.php** [File generated by template system, that stores which template sets to use and in what order to search through them]+
  
-Now, lets assume in the admin, the list of [[#Active]] template sets is in the exact order listed below: +The above syntax would be used anywhere that you normally specify the location of template or file inside a template set.  For example:
-  * blufyre_startrek +
-  * my_templates +
-  * customized_search +
-  * default ((NoteDefault template set is always active and last in template seek order, but not displayed in admin if currently in //Standard Mode//))+
  
-When the software is getting a template to use, this is the steps it follows when using the above setup: +<code>{include file='[template_set_name]file_name.tpl'}</code>
-  * The system needs to load the template **system/cart/display_cart/index.tpl** to display the **{body_html}** for the main cart page. +
-    - Looks for file:\\ geo_templates/**blufyre_startrek/**system/cart/display_cart/index.tpl\\ File does not exist, so it continues searching. +
-    - Looks for file:\\ geo_templates/**my_templates/**system/cart/display_cart/index.tpl\\ File does not exist, so it continues searching. +
-    - Looks for file:\\ geo_templates/**customized_search/**system/cart/display_cart/index.tpl\\ File does not exist, so it continues searching. +
-    - Looks for file:\\ geo_templates/**default/**system/cart/display_cart/index.tpl\\ File Found! +
-    - If [[admin_menu/site_setup/cache/start]] is turned on, the system saves the location that it found the file, so that next time it knows to go straight to the geo_templates/default/ directory to find it without having to look through all the other template sets first. +
-  * This time, we're on the search page, and system is looking for the template **system/search_class/details_form.tpl** +
-    - Searches through the template sets like last time.  This time it stops on the file found in **customized_search/** template set.  Even though the file existed in default, since customized search was higher on the list, the template from that template set was chosen.+
  
 +The above example, would include the template named **file_name.tpl** and look **only** in the template set named **template_set_name**.  Note that if it is not found in that template set it will not look any further, and the system will behave just like the template does not exist, even if it does exist in another template set, even in the default template set.
admin_menu/design/template_sets/start.1299272116.txt.gz · Last modified: 2014/09/25 16:55 (external edit)