KOPFZEILE friendlyGIS

Deutsche Version
Deutsche Version

Contents

Contact: info@friendlyGIS.com

Copyright© friendlyGIS ® GmbH 2000-2010

Last update: January 1st, 2011

-->loading and saving configurations

-->view session data

Tayloring the HTML templates

Tayloring the HTML templates

Preliminaries

Tayloring the HTML templates is straightforward. However, it is necessary to know some details of how to handle HTML files. We suggest using a simple HTML editor like HTML Kit, or a text editor. Wysiwyg HTML Editors tend to produce a lot of junk, however, you may try for your own.

SW-Lookup®'s internal working is based on a simple homepage structure which resides in the dispatcher's home directory. If accessed via the dispatcher, this directory serves as the root directory. If you access it via the Windows explorer or a similar UNIX or LINUX tool, this isn't the root directory. This leads to the problem of not finding the correct links, e. g. to the images stored in the "images" directory, while editing the templates.

When working with Windows, it is possible to "map" any directory to a virtual drive letter, which is valid only for the current session.

To achieve this, please do the following:

  • Open a DOS Prompt window
  • Change to the dispatcher's root directory using the "chdir" resp. "cd" command.
  • Choose an available (that means, not yet existing) drive letter, for instance, H:
  • Enter: subst H: .

After some Bill-Gates-memorial seconds you will find the drive in your explorer. Then, edit the files on the base of this new virtual drive.

You can also edit the files without these precautions, but the images will not be found during editing.

What do we need to taylor?

SW-Lookup® consists of a homepage, which resides below the dispatcher homedirectory and has the following components:

  • The Root directory, where you find the stylesheet "friendlyGIS.css" and the opening page "index.html". Both may be modified as needed. However, be cautious with the stylesheet, since it influences all pages!
  • Subdirectory "images", which holds the images (backgrounds, logos etc.)
  • Subdirectory de_de with the german pages. The page index.html is the search page, and can be modified as needed.
  • Subdirectory en_gb with the english pages. Same thing as above.

For additional languages, there may be more subdirectories named after the Smallworld® language codes.

The displayed pages during a SW-Lookup® session mostly come from so called HTML templates, which reside in the "templates" subdirectory. These are simple HTML pages, which contain variables which get filled with the data from SW-Lookup®.

Before you get started with modifying the templates, you should first try SW-Lookup® to ensure that the system is installed correctly. Then, you may taylor these templates as needed, and you can adjust the layout to your own needs and wishes. If you need help with tayloring, please contact friendlyGIS ® for assistance.

You find templates for the following steps in the "templates" directory:

  1. Result page (list of the objects found for a query)
  2. Object description (the page with the overview and detail graphics)
  3. Object list (the page with the graphics and the list of the objects shown there)

In detail, these are the following files (normally, you need to only adjust the files for the language you are using)

Filename Content
result_table.html General template for the result page. This is used if no language-specific page could be found.
result_table_de_de.html German template for the result page
result_table_en_gb.html English template for the result page
object_description.html General template for the object description. This is used if no language-specific page could be found.
object_description_de_de.html German template for the object description.
object_description_en_gb.html English template for the object description.
object_list.html General template for the object list. This is used if no language-specific page could be found.
object_list_de_de.html German template for the object list.
object_list_en_gb.html English template for the object list.

How to do the tayloring

In each template, some variables are included, which are replaced by SW-Lookup®

These variables begin and end with a double dollar sign to allow SW-Lookup® to find it. SW-Lookup® uses a very efficient mechanism to generate the pages after the template has been loaded.

As a drawback, the usage of the variables also for image size leads to the images not being displayed during template design. However, since HTML creates the page layout dynamically, this seems to be acceptable.

The templates which are delivered already hold all necessary variables. To adjust the templates, you will most often simply change colours or replace the SW-Lookup® logos by your own company logos. Simpy try to change e. g. the colour values (e.g. bgcolor="#xxxxxx") and look at the effect. You may also create a file with a WYSIWYG-HTML-editor and copy colour values etc. to the template (in source code mode).

TIP:Please note that the templates are only loaded if you restart the dispatcher!

-->loading and saving configurations

-->view session data