User Tools

Site Tools


Sidebar

startup_tutorial_and_checklist:design_configuration:general_template_text

General Template Text

This feature allows you to separate all text from within your template sets. While that doesn't sound like a lot it means you can only need to maintain one template set for more than one or multiple languages. Previously to this feature there was a lot of text hard-coded within templates. This forced you to have one template set for each language you support on your site. While you can still include text within your templates the addition of this feature doesn't make that a necessity. You can find all template text within the following admin tool:

PAGES MANAGEMENT > COMMON TEMPLATE TEXT

You'll see an admin tool like the following:

Click the edit buttons to the left. On the next page choose the language you wish to edit. The next page contains all the general site text for that section. This looks like any text admin you would see attached to a page but the text here is available on all pages within the system. You'll see an admin tool like:

Within that screen shot you'll see:

  1. The default label used for that text within the default template sets
  2. The current value for that text
  3. Click "edit" to change the text.

Once you click to edit a listing you will see the admin tool like this:

Within that screenshot you'll see:

  1. The default label or default use for that text within the default template sets
  2. "Page" text is attached to. This is not really necessary here but most text within the system is used within one page/feature in the system. The common template text is available within all pages/features of the system.
  3. The language the current text is attached to.
  4. The character set used for the accompanying text. This links to the character set used by the system as a whole. All your text in your site should use only one character set or there will be character display issues on the client side. We suggest keeping the default UTF-8 as all characters are included within that character set.
  5. The default description for the current text edited.
  6. The current value of the text currently edited.
  7. Once changes are made click to save.

Placement Within Template

All these pieces of text need to be placed within the template to be displayed/useable. You would use a placement tag to put that text in the template. For example the above "home link text" shown above would use the following tag:

{$common_text.502390}

You derive that tag using the number associated with that text. You can find that text id number in the url of the text when editing it. The screenshot here illustrates:

The arrow points to the number to use in the placement tag. The screenshot below shows the above tag in use within the following default template:

/main_page/header.tpl

Extra Page Contents

This is one of the better uses of the template text feature if supporting multiple languages on your site. The default template sets come with extra pages that include text hard-coded within them. If you are using multiple languages you can either use multiple template sets one for each language. Or you can use template text within the bodies of your extra page text and manage that within the template text tool.

Do note that each "template text" will only hold up to 255 characters. Double-byte characters (Some Chinese, Cyrillic,…etc) pull that down to half that size. Remember that limit when inserting template text into extra page. It may take more than one "template text" to get all your extra page text within that page.

startup_tutorial_and_checklist/design_configuration/general_template_text.txt · Last modified: 2017/08/28 17:47 by geojames