The menu structure of the web interface can be controlled from within the web interface itself. Menus names can be changed, the permissions required to see menus changed, and new menus added. New menus would typically be installed under /etc/enswitch/www, but may be on other websites outside the system.

To add a new menu

  1. Log in to the Enswitch web interface.
  2. Go to System » Menus.
  3. Click on the "New" button.
  4. Enter the following:
    • The name of the menu as seen by the user.
    • A tag for the menu. This is referenced within the Enswitch code so that the web interface knows which menu to show as currently selected.
    • Optionally, a description.
    • Which menu to display this menu under. If this is a top-level menu, select "Top level".
    • The rank. Menus are displayed sorted by rank, lowest number first, then alphabetically.
    • The URL to go to when the menu is clicked. Take note of these:
      • For the old web interface, "/local/" is the URL path for /etc/enswitch/www, so if you have installed your new web page in /etc/enswitch/www/mypage/, use "/local/mypage/".
      • For the new web interface, "/local/" is the URL path for /etc/enswitch, so if you have installed your new web page in /etc/enswitch/mypage/, use "/local/mypage/", as with the old web interface.
      • The URL can also link to an external website using a full URL.
    • If this is a top-level menu, the URL of the icon. Like the above url, "/local/" is the URL path for /etc/enswitch/www, so this would typically be "/local/mypage/icon.gif" or similar.
    • Which rate plan features are required to view this menu. If multiple are selected, the user will see this menu if their rate plan allows any of the selected features. If none are selected, the menu is always shown.
    • Which rate plan role settings are required to view this menu. If multiple are selected, the user will see this menu if their role allows any of the selected role settings. If none are selected, the menu is always shown.
    • If multiple languages are configured, which language to show this menu for.
    • Which rate plan, if any, the customer must be directly on to view this menu. Normally this is set to "Any".
    • Which rate plan, if any, the customer must be on, directly or indirectly, to view this menu. Normally this is set to "Any".
    • Which configuration setting, if any, is required to be enabled to view this menu. Normally this is set to "None".
    • Which special condition, if any, is required to view this menu. Normally this is set to "None".
  5. Click the "Save" button.

The URL when clicked and the icon URL may contain the following variables:

  • <TMPL_VAR NAME=CUSTOMER> is the customer's ID.
  • <TMPL_VAR NAME=ID> is the person's ID.
  • <TMPL_VAR NAME=LANGUAGE> is the person's language code.
  • <TMPL_VAR NAME=PASSWORD> is the person's password.
  • <TMPL_VAR NAME=PLAN> is the rate plan's ID.
  • <TMPL_VAR NAME=ROLE> is the role's ID.
  • <TMPL_VAR NAME=USERNAME> is the person's username.

Guidelines for the files structure of a menu

  • Sample files layout for a menu to be used with the old web interface:
    /etc/enswitch/www/mypage/ 
    ├── index.html 
    └── icon.gif
    
  • Sample files layout for a menu to be used with the new web interface:
    /etc/enswitch/mypage/ 
    ├── Controller.js 
    ├── template.html 
    └── icon.gif
    
  • If your system runs the old and the new web interfaces at the same time, you will need to prepare both files layout for the menu, as the previous samples show.
  • When using the old web interface with a web server configured to not allow directory index access, having an index.html or index.pl file for the menu is needed to avoid HTTP responses with a 403 status code ("Forbidden" error).
  • When using the new web interface, the files named Controller.js and template.html are required.