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_field fieldname] HTML [/if_field] pair can be used to insert HTML only if there is a non-blank value in a particular field.

Because the tags are the same, an [item-list] cannot be used on an on-the-fly page. The [loop arg="item item"] tag is still usable. If you want to have an on-the-fly page mixed in, use the [fly-list CODE BASE] [/flylist] pair, which essentially encapsulates a flypage within a page.

[fly-list code="product_code" base="table"] ... [/fly-list]
(New tags mode only.)

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-field field]         Tests for a non-empty value in B<field>
 [if-data db field]       Tests for a non-empty 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  <<  >>