5.9. cat

cat_root/products/cat.txt

This table contains properties of product categories. Notice the similarity to the area table, since both the area and cat tables supply data for building links to results pages.

Fields

Field Description
code Unique key
sel Space-delimited list of foreign keys into area table
name Category name
which_page Page class in which the category may appear
sort Sorting prefix for entry (preempts standard alphanumeric sort)
display_type How to label the category links (name, icon, url or image)
image Image URL (if appropriate)
image_prop HTML attributes for output <img> tag (if appropriate)
banner_image Image name for use in target page
banner_text Text for use in target page
link_type Type of links in the navbar (external, internal, simple, complex)
url Target for internal or external link_type
tab Database table file to use with 'simple' link_type
page Results page to use with 'simple' link_type
search Search spec used with 'complex' link_type
selector The selector used to scan the products table for products in the category
link_template Overrides template used for building links

5.9.1. code

Example Data

   1
   4
   5

Unique key.

5.9.2. sel

Example Data

   6
   8 9
   9

Space-delimited list of foreign key(s) into area table. The category will appear in each navbar section (defined by a row in the area table) where the key from cat.sel matches the area.code.

For example, the foundation catalog (tools) places Gift Certificates in more than one category of the left navbar.

5.9.3. name

Example Data

   Breathing Protection
   Eye Protection
   Gift Certificate
   Picks & Hatchets
   Pliers
   Rulers
   Sandpaper
   Toolboxes

Category name for display.

5.9.4. which_page

The page class. When building links, you can select categories matching a page class. This means you could set up your catalog to show a different list of links on page 'foo.html' than on page 'bar.html'.

5.9.5. sort

Example Data

   01
   03

Lexographic (alphanumeric) sorting prefix. Notice use of '03' rather than '3', which would sort after '13'. You can use this to control the order of the categories in a list of links.

5.9.6. display_type

Example Data

   name
   icon
   url
   image

What to use for the labels in the navigation bar (for example, name, icon, url or image). The links in the foundation catalog are set up with 'name' display_type.

display type Link shown as
name Displays name only
icon Displays name and specified image
image Displays image only
url Displays link

5.9.7. image

Image URL for image or icon display_type.

5.9.8. image_prop

For image or icon display_type, this contains the HTML <img ...> tag attributes for the links, for example:

  <img src="image" alt="name" image_prop>name

5.9.9. banner_image

Example Data

   promo_image.gif

This field is not related to banner ads. It is useful if you want to pass to your results page an image that is specific for the navbar entry (perhaps to display a banner above your results).

If you are using an Interchange search for your links (i.e., 'simple' or 'complex' link_type), then this will add 'va=banner_image=banner_image' to the resulting search specification. This puts the contents of banner_image into the Values hash in your search results page. You can access it with [value banner_image] (see the value tag). You will have to modify the standard results page (or set up and specify your own) in order to display the image. For example, you might include the following in your results page:

   <IMG src="[value banner_image]" alt="[value banner_text]">

5.9.10. banner_text

This field is not related to banner ads. It is useful if you want to pass to your results page some text that is specific for the navbar entry (perhaps to display a title above your results).

If you are using an Interchange search for your links (i.e., 'simple' or 'complex' link_type), then this will add 'va=banner_text=banner_text' to the resulting search specification. This puts the contents of banner_text into the Values hash in your search results page. You can access it with [value banner_text] (see the value tag). You will have to modify the standard results page (or set up and specify your own) in order to display the text.

5.9.11. link_type

Example Data

   none
   external
   internal
   simple
   complex

The link type to create.

Link type Description
none No link
external External link. The HTML specified in url will go directly into the link.
internal Internal link. This will be highlit if it is the current page. If you specify both a page and a form for the link, the url field should contain "page form". See the Search Engine documentation for more detail on search forms.
simple Allows you to specify an Interchange search with a few values. See the bar_link subroutine in the /dist/catalog_before.cfg configuration file for more detail.
complex Allows you to fully specify an Interchange search specification. See the bar_link subroutine in the /dist/catalog_before.cfg configuration file for more detail if you need to use these.

5.9.12. url

Target URL (external link or internal page/search specification). See link_types above.

5.9.13. tab

Example Data

   products

Database table file to use with 'simple' link_type (searchspec fi=tab).

5.9.14. page

Example Data

   swap_results

Results page to use with 'simple' link_type (searchspec sp=page).

5.9.15. search

Example Data

   fi=merchandising^Msf=featured^Mse=new
   fi=merchandising^Msf=featured^Mse=special^Msu=yes

Search spec used with 'complex' link_type. See the Search Engine documentation for more detail on search forms.


Note: The '^M' delimiters in the sample data represents a carriage return character (Control-M, or hexadecimal 0x0d).

5.9.16. selector

Example Data

   category=Breathing Protection
   category=Eye Protection
   category=Gift Certificate
   category=Picks & Hatchets
   category=Pliers
   category=Rulers
   category=Sandpaper
   category=Toolboxes

The element that is used to scan the products table for products in the category. Used with 'simple' link_type.

5.9.17. link_template

Overrides the usual HTML link template for navbar entries. See the bar_link subroutine in the /dist/catalog_before.cfg configuration file if you need to modify link templates.