MML -- MiniVend Markup Language

### Index Up << >>

## MML -- MiniVend Markup Language

MiniVend functions are accessed via MML, the MiniVend Markup Language. The pages in the catalog are in HTML, but use MML tags to provide access to MiniVend's funtions. MML tags use `[square brackets]` instead of angular brackets. We will usually call them MiniVend tags or just tags. They are similar to HTML in syntax, i.e. there are both <I>standalone</I> and <I>container</I> tags. A standalone tag has no ending element, i.e.:

        [value name]

This tag will insert the user's name, providing they have given it to you in a form. A container tag has both a beginning and an ending element, as in:

        [if value name]
        You have a name.
        [/if]

These tags perform various display and modification operations for the user session. There are over 80 standard predefined tags, and the `UserTag` facility allows you to create tags fully as powerful that perform your own functions.

Don't expect to understand all of the tags to begin with, there are many. As an introduction, a few of the the tag names and their general function are:

     [accessories]     Access product accessory functions
     [area]            Insert a re-written MiniVend URL
     [checked]         Conditionally check an HTML check/radio box
     [currency]        Formats a number like currency for current locale
       [/currency]
     [data]            Access a database or user session element
     [error]           Check/display form processing errors
     [file]            Insert the contents of a file
     [flag]            Set a minivend flag
     [fly-list]        Show an item "on-the-fly" in an arbitrary page
       [/fly-list]
     [html_table]      create an HTML table from a query or list
     [include]         Include a file with complete MiniVend interpretation
     [item-list]       Iterate over a shopping cart
       [/item-list]
     [label]           Set a label for goto
     [loop]            Iterate over an arbitrary list
       [/loop]
     [mvasp]           ASP-style Perl programming area
     [no-match]        Define area of region results displayed when no match
       [/no-match]
     [nitems]          Show number of items for a shopping cart
     [order]           Create HTML link to order an item
     [page]            Create A HREF with re-written URL to call MiniVend page
     [perl]            Embed output of arbitrary Perl in the page
       [/perl]
     [price]           Show price of an item
     [process]         Create URL for MiniVend form processing
     [query]           Perform any of several types of SQL query
       [/query]
     [record]          Set a database record
     [region]          Define an area of the page as a search list/query
     [row]             Used with [col] -- rudimentary text tables for order reports
       [/row]
     [salestax]        Show amount of salestax for shopping cart
     [scratch]         Access a scratch variable
     [search-list]     Display output of a MiniVend search
       [/search-list]
     [selected]        Conditional selection of drop-down <SELECT ...>
     [set]             Set a scratch variable
       [/set]
     [sort]            Set sort order for iterating lists
       [/sort]
     [subtotal]        Calculate subtotal without tax or shipping
     [total-cost]      Calculate order total with tax, handling, and shipping
     [userdb]          Access user database functions
     [value]           Display form value
     [value_extended]  Display form array values or do file upload functions

A complete list of tags and all tag syntax is shown in the TAG REFERENCE.

### Index Up << >>