Outline:
Return to Table of Contents
The shopping system has three major areas where software, data and configurations are stored. The information in these directories is often useful on tame pages you create for your customers. Computers are not forgiving and development and support time can be wasted because of incorrect information in the path to a file. To reduce the time to enter information and to eliminate errors, tame includes operators or alias for these directories. Below is a map of the major directories and a description of the information included in each location.
Understand the location of the files is the first step to using path operators. The next step is understanding why you would use them. The tame language has PATH-FILE requirements within various tags. These paths can be the full path from the document root or from the tame root (system directory), but tame provides a shortcut to the most often used locations. In order to eliminate the need to remember the full path and to shorten the coding time, the path operator tilde (~) is used. The (~) path operator generates tame directory and file paths. The operator provides aliases that represent common tame directories such as the shop or the mirror directory. The path operator can be used in any tame command or within any tame area where a PATH-FILE is necessary. Below is a list of the common aliases that are associated with the above directories. In addition, as a reference a map of directories and aliases is included at the end of this section.
Alias Path ~ | Creates a tame path to: |
~web | the root of the web document directory tree. |
~shop | current shop base directory. |
~dept | current shop sub-directory. Same as the ~shop directory when not in a sub-directory. |
~// | root of the mirror tree. Mirrors the webroot directory. |
~//shop | mirror directory for the current shop. |
~//dept | mirror directory for the current shop sub-directory. |
~! | root of the system global directory tree. |
~cgi-bin | current cgi-bin directory. |
~cart | full path to the current cart file. |
~carts | path to the current cart file directory. |
There are a variety of tags that can use path operators. The following are examples using aliases:
<tame> setgate: FILE ~shop </tame>
This will set the directory location of the data file to the shop directory. Now additional data access tags, such as defines, simply name the file within this directory.
<tame>include: ~//shop/coolfile.tag </tame>
The coolfile.tag file is located in the mirror shop directory. Using this tag allows all the information and variables defined in the coolfile.tag to be accessible in the current *.tam file.
In addition, embedded curly bracket format { } is allowed within a path operator.
<tame form>
<tame> text: cust 8 </tame>
<tame> passgate </tame>
<tame> htmlfile: {~//shop/{&cust}} </tame>
<tame /form>In this example an alias is used for additional security. The passgate is used to restrict access to information on a page. The information to present is in the mirror shop directory. Instead of typing the full path (i.e., /tame/hostfiles/shopname/custname.tam), you can use the shortcut to the shop mirror directory. Once the customer variable is provided and the password is entered, a special file created for the customer is presented.
Access a file this way provides additional security because the information to be presented is stored in a directory outside of the document directory. Files outside the document directory can not be access directly by typing a URL into a browser.
Here is a directory map of the primary shopping system directories and their aliases. Sub-directories under these aliases are added by standard format, for example: ~shop/subdirectory/file.
draft: Katherine C. Davis 5/21/97