User Tools

Site Tools


Sidebar

admin_menu:design:template_sets:start

Help for Admin Menu Page: Design > Template Sets

Template Sets

The file-based templates in the Geo software are organized into Template Sets, located in the software in the directory:

geo_templates/

This page allows you to activate, change active template seek order, deactivate, clone, change which sets you are working with, download, and upload template sets.

Template Sets

Template Sets Columns

Active

This column will have a check-box for every template set. When displaying a page, and the system is looking for a particular template, it will look through any template sets that are marked as active on this page.

The default template set is always active, so that if a template is not found in any of the other template sets, the one from the default template set will be used.

The active template sets will be grouped together on the page, as shown in the screenshot above. Check or un-check the box then click Save Settings, to activate or deactivate a template set from being used when viewing the client side.

Admin Editing

This column allows you to select which template sets you are currently editing in the design section of the admin panel. In standard mode, you can only edit a single template set at a time. You can edit active or even in-active template sets.

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: 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!

Template Seek Order

This column allows you to change the template seek order, amongst the active template sets. This column will only display if there are 2 or more active template sets besides the default template set1).

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 page.

Template Set Name

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: 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 Design Philosophy page for a more in-depth explanation.

Template Set Buttons

There are a number of buttons next to each template set that do various things with the template set.

Edit Templates

This button will appear next to any applicable template set. It is basically a shortcut that does the following:

  1. Changes Admin Editing to select the template set.
  2. Takes you to the page Design > Manager directly to the main_page/ sub-folder for the template set.

Copy

This button will open a dialog similar to the screen-shot below:

 Copy template set

Once you enter the new template set name, click the Copy Now button to perform the copy, or Cancel to cancel the action. Below the fields in the dialog are explained in more detail.

Copy From

This will be the template set you are copying from. Make sure it is the one you intended to copy.

New Template Set Name

Enter the name for the template set copy you are creating. The name must be alpha-numeric (since it is used for the folder name) and it cannot be something that already exists.

What Template Types

Check the box next to each "template type" (in other words, the direct sub-folders for that template set). It is recommended to only copy main_page and external (the ones checked by default), but if you are making this copy for "backup" purposes you will want to check all types. Keep in mind that for system, module, or addon templates you should not create a copy outside the "default" template set, except for files you intend to customize.

Note that it will only show the types that exist in the template set being copied.

Download

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.

This button will open a dialog similar to the one displayed below, to allow downloading the entire template set for backup or portability purposes.

Download Template Set

Check what parts of the template set you wish to download, then click the Download button to download a zip file containing the template set, or click Cancel to cancel the action. Below the fields in the dialog are explained in more detail.

Template Set to Download

This is the template set that will be downloaded, make sure it is the one you meant to download.

Include What Template Types

Check the box next to each "template type" (in other words, the direct sub-folders for that template set). It is recommended to only download main_page and external (the ones checked by default), but if you are making this copy for "backup" purposes you will want to check all types. If you are creating a template set to distribute, note that if you have system, module, or addon templates and you select to download those when creating your template set package, the template set will most likely need to be updated in newer versions of the software, in other words it will be heavily tied to the version the template set was first created on.

Re-Scan Attachments

Using this button will open a dialog similar to the one below:

Re-Scan Template Set

On the dialog, click Re-Scan Templates For Attachments button to perform the re-scan for the given template set, or click Cancel to cancel the action.

If you prefer to edit templates directly using FTP or another file manager, and edit files "locally" rather than through the admin panel, this is a button you will most likely be using quite often. What is does is it scans each template in the main_page/ folder for that template set, and finds everything "attached" to that template. Using what it finds, it updates the attachments set for that template set.

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: 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.

Re-Scanning Default Templates

Never edit the default template set! See Default Template Set - do not change! for more info on why.

Why use re-scan templates for default template set, if you should not edit it anyways? The purpose, in a nutshell, is to re-copy any templates added by adons to the default template set, something that is normally done when an addon is installed or updated.

Since this is already automatically done when an addon is installed or updated, this tool is only used for the following situations:

  • Geo support instructs you to do so.2)
  • Something weird happened during the addon install/update so it needs to be re-done.
  • If it was ever necessary to totally delete the default template set, and re-upload it from the software package.3)

Import Text Changes

Note that this button will only show for active template sets. This button will open a dialog similar to the one shown below:

Import Text Changes

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: 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.

The fields in the dialog are explained in more details below:

Import text.csv File

In the dialog, in the info box at the top it will display the file name for the text import. It will be text.csv inside the template set folder. It is highly recommended to view and possibly edit the text import file listed before performing the update! 4) If you use a language other than English (or whatever the text import file language is used), you will need to edit the file to translate the text prior to importing the changes.

Suggested Text Changes for Template Set

This is the template set the text changes are "from", make sure it is for the template set you wanted.

Apply Suggested Text Changes to Language

Select which language to import the text changes to. Remember to translate the text file prior to importing it!

Delete

Note that this button will only show for inactive template sets. This button will open a dialog similar to the one shown below:

This tool will allow you to delete an entire template set from the admin panel. Note that the template set, and all contents in the template set, must be writable in order to delete the template set. If there are any files that are not able to be removed, only part of the template set will be able to be deleted, if any at all.

The delete tool has a 2 part confirmation, to make it harder to accidentally remove a template set. You must change the radio box selection to Yes, delete template set, then click the button DELETE Now, failure to do either of these will cancel the deletion.

Make sure you are deleting the correct template set! It will display which template set is being deleted in the tool box. In the screenshot above, the template set black_primary is the one that is being deleted. Once a template set has been deleted using this tool, there is no way to undo the deletion. If you made a backup of the template set prior to deleting it, you may be able to restore the backup. Once deleted the template set cannot be restored without an external backup made prior to the deletion, if you did not make a backup then it cannot be restored.

Upload Template Set

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.

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:

Upload Template Set

Select the template set to upload, then click the Upload Set button to upload that template set, or click Cancel to cancel the action. Below is more information for each of the fields in the dialog.

Template Set zip file

Use the Browse button to select the template set zipped file on your local computer.

If template set exists?

If you are uploading a template set with a name that is the same as a template set already in existence on your site, select the appropriate option for whether you want to rename the template set being uploaded, or replace the existing template set.

Use set

Check the box to make the template set being uploaded automatically activated (with the checkbox for the Active column checked).

Merge Sets Together

This button will open a dialog similar to the one below:

Merge Template Sets

This is handy if you have multiple template sets being used, you can merge all the templates into a single template set to make it easier to manage. What this will do, is allow you to select which template sets you want, then "merge" them into one template set, and save the template set using the name that you specify in the merge dialog.

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: 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!

See below for more information on each field within the dialog.

Copy From: Select which of the template sets you wish to merge together.

New Template Set Name: Enter the name for the merged template set. The name must be alpha-numeric (since it is used for the folder name) and it cannot be something that already exists.

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.

Create Main Template Set

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!

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.

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.

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 purposes) or 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.

Advanced Settings

This entire section has been moved to Design > Settings in version 7.3.0, refer to that page for information about each setting that used to be on this page.

Default Template Set - do not change!

We can't stress this enough, you should never edit any files in the default template set directly.

See Here for more info

Specify the template set

Note: The 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 longer, but this specific functionality noted below requires at least 6.0.0.

When you are specifying a 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 a special syntax that is supported, that will force using a specific template set. This is to simulate the functionality built into Smarty itself, that allows including a template resource from a specific template folder. More info on that here - see section "Specifying the $template_dir to use".

To specify the template set to load the template resource from, and bypass the normal behavior outlined in How a template set is chosen, include the template set folder name in square brackets before the name of the template. See the example below:

[template_set_name]file_name.tpl

The above syntax would be used anywhere that you normally specify the location of a template or file inside a template set. For example:

{include file='[template_set_name]file_name.tpl'}

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.

1)
If there is only 1 active template set besides default one, you cannot change the order, so the column is not displayed.
2)
usually because you fall under one of the other situations in this list
3)
When doing so, remember to CHMOD 777 the default template and all contents!
4)
At this time, you will only be able to view/edit the import text manually using FTP.
admin_menu/design/template_sets/start.txt · Last modified: 2021/11/10 19:32 by jonyo