Index  Up  >>  


On-the-fly Catalog Pages

If an item is displayed on the search list (or order list) and there is a link to a special page keyed on the item, MiniVend will attempt to build the page ``on the fly''. It will look for the special page flypage.html, which is used as a template for building the page. If [item-field fieldname], [item-price], (etc.) elements are used on the page, quite complex and information-packed pages can be built. The [if-item-field fieldname] HTML [/if-item-field] pair can be used to insert HTML only if there is a non-blank value in a particular field.

IMPORTANT NOTE: Because the tags are substituted globally on the page, you cannot use [item-*] tags on the default on-the-fly page. If you want to use a [search-region] or [item-list] tag, change the default with the prefix parameter. Example:

    [item-list prefix=cart]
    [cart-code] -- title=[cart-data products title]
    [/item-list]

If you want to have an on-the-fly page mixed in reliably, use the idiom [fly-list prefix=fly code="[data session arg]"] [/flylist] pair.

[fly-list code="product_code" base="table"] ... [/fly-list]
Other parameters:

    prefix=label     Allows [label-code], [label-description]

Defines an area in a random page which performs the flypage lookup function, implementing the tags below.

   [fly-list code="[data session arg]"]
    (contents of flypage.html)
   [/fly-list]

If you place the above around the contents of the demo flypage, in a file named flypage2.html, it will make these two calls display identical pages:

    [page 00-0011] One way to display the Mona Lisa [/page]
    [page flypage2 00-0011] Another way to display the Mona Lisa [/page]

If the directive PageSelectField is set to a valid product database field which contains a valid MiniVend page name (relative to the catalog pages directory, without the .html suffix) it will be used to build the on-the-fly page.

Active tags in their order of interpolation:

 [if-item-field field]    Tests for a non-empty, non-zero value in B<field>
 [if-item-data db field]  Tests for a non-empty, non-zero B<field> in B<db>
 [item-code]              Product code of the displayed item
 [item-accessories args]  Accessory information (see I<accessories>)
 [item-description]       Description field information
 [item-price quantity*]   Product price (at B<quantity>)
 [item-field field]       Product database B<field>
 [item-data db field]     Database B<db> entry for B<field>


Index  Up  >>