MENU

<< Click to Display Table of Contents >>

Navigation:  Gekko commands >

MENU

Previous pageReturn to chapter overviewNext page

MENU is not a command, but the 'Menu' tab will open up a .html menu file when clicked (regarding the .html file, see 'Related options' below). Menus can for instance be used to organize tables (.gtb) in hierarchies, or call command files (.gcm). The easiest way to start up the menu system is to click on the 'Menu' tab. Another possibility is via 'Window' --> 'Restart Menu' (in the Gekko user interface).

 

Menu's are browsable, i.e., you may use the backwards and forwards arrows. The 'Home' button will point the menu to the starting .html file.

 


 

Details

 

The html file will be shown in the 'Menu' tab in the same way as the html file would be shown in an internet browser. The only real difference is that links work in a slightly different way. If the link is to a file with extension .gtb, Gekko will show that particular table (as text in the 'Main' tab, or as html in the 'Menu' tab, depending upon the setting OPTION table type...).

 

For instance, the html may contain the following HTML code:

 

<a href="s43.gtb">Production</a>
<a href="scenario1.gcm">Run scenario 1</a>

 

 

The first <a> tag indicates a link, with link text "Production". The linked file is s43.gtb. Since this is a .gtb file, Gekko shows this particular table when the link is clicked. Instead of a .gtb file, you may indicate a .gcm file (command file) inside the quotes. In that case, if the link is clicked, Gekko will RUN the .gcm file.

 

You may design the HTML pages in any way you like, for instance it can be convenient to style menus by means of a common stylesheet (CSS), so that their design can be controlled centrally. Gekko will show just about all legal HTML code you may come up with, including images etc.: the engine showing the HTML in the 'Menu' tab is in reality the same engine that is used for showing pages in Internet Explorer.

 

The HTML files can be made by means of any HTML editor, for a free and quite robust editor, you may for instance try the free Kompozer.

 

There is an automatic menu conversion tool from the older PCIM menus to the new HTML format. See the menu: 'Utilities' --> 'Converters' --> 'PCIM converters' --> 'Convert PCIM menus...'.

 

 


 

Example file

 

The HTML code below shows a menu ('OVERVIEW') with five items. The two first items link to two different submenus (menu1/menu2.html), whereas the two following links link to two different tables (s1/s2.gtb). The last item gives the opportunity to browse a level up to a parent menu (main.html).

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <link rel="stylesheet" href="styles.css" type="text/css">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>OVERVIEW</title>
  </head>
  <body>
  <big><b>OVERVIEW</b></big><br>
    <ul>
      <li><a href="menu1.html">SUPPLY BALANCE</a></li>
      <li><a href="menu2.html">IMPORTANT KEY FIGURES ETC.</a></li>
      <li><a href="s1.gtb">Production <img src="table.png"><font color="gray"> S1 </font></a></li>
      <li><a href="s2.gtb">Productivity <img src="table.png"><font color="gray"> S2 </font></a></li>
      <li><a href="main.html">***MAIN MENU***                                    Back</a></li>
    </ul>
  </body>
</html>

 

You may run command files via the menus, for instance adding the following list item to the menu system:

 

<li><a href="menutest.gcm">Run menutest.gcm</a></li>

 

This will provide a link ("Run menutest.gcm"), and when the link is clicked, menutest.gcm is executed.

 

The HTML file uses a stylesheet (styles.css) which can be common the all the HTML files in the menu system. In addition, a small table icon is used (table.png), to indicate that the item points to a table. The stylesheet styles.css could be something like this:

 

body {
  color: #000000;
  font-family: Verdana;
  font-size: 10pt;
  font-style: normal;
  font-variant: normal;
  background-color: white;
}
{text-decoration: none;}
img {border-style: none;}

 

 

This sets colors, font, size etc., and indicates that HTML links (<a>) should have no underline, and HTML images (<img>) no border.

 

 

 


 

Note

 

A menu system may be organized in folders and sub-folders, if preferred. In that case, call the html file in the subfolder with <a href="subfolder/menu1.html">  for instance. To navigate to a parent folder, use '..', for instance <a href="../menu1.html">. These are standard html conventions regarding relative paths.

 

Anything can be put into the html file, but for security reasons Gekko will not open up Internet links in the Menu tab. If an external Internet link is present (for instance http://www.t-t.dk/gekko), Gekko will open that link with the default web browser.

 

You may use the EDIT command to edit the files (for instance: EDIT menu.html;), but using a special html editor may be easier.

 

 


 

Related options

 

OPTION menu startfile = menu.html;

OPTION folder menu = ...;

OPTION interface table operators = yes;  //click transformations on tables

 


 

Related commands

 

TABLE, EDIT