Полезная информация

Interchange Tags Reference



Table of Contents


1. Interchange Tags Reference

ITL stands for Interchange Tag Language. ITL is a superset of MML, or Minivend Markup Language. Minivend was the predecessor to Interchange.

There are dozens of ITL pre-defined tag functions. If you don't see just what you need, you can create user-defined tags to just as powerful as the pre-defined ones.

There are two styles of supplying parameters to a tag -- named and positional. In addition, you can usually embed Interchange tags within HTML tags.

In the named style you supply a parameter/value pair just as most HTML tags use:

    [value name="foo"]

The same thing can be accomplished for the [value] tag with

    [value foo]

The parameter name is the first positional parameter for the [value] tag. Some people find positional usage simpler for common tags, and Interchange interprets them somewhat faster. If you wish to avoid ambiguity you can always use named calling.

In most cases, tags specified in the positional fashion will work the same as named parameters. The only time you will need to modify them is when there is some ambiguity as to which parameter is which (usually due to whitespace), or when you need to use the output of a tag as the attribute parameter for another tag.

TIP: This will not work:

    [page scan se=[scratch somevar]]

To get the output of the [scratch somevar] interpreted, you must place it within a named and quoted attribute:

    [page href=scan arg="se=[scratch somevar]"]

Interchange tags can be specified within HTML to make it easier to interface to some HTML editors. Consider:

    <TABLE MV="if items">
    <TR MV="item-list">
    <TD> [item-code] </TD>
    <TD> [item-description] </TD>
    <TD> [item-price] </TD>
    </TR></TABLE>

The above will loop over any items in the shopping cart, displaying their part number, description, and price, but only IF there are items in the cart.

The same thing can be achieved with:

    [if items]
    <TABLE>
    [item-list]
    <TR>
    <TD> [item-code] </TD>
    <TD> [item-description] </TD>
    <TD> [item-price] </TD>
    </TR>
    [/item-list]</TABLE>
    [/if]

What is done with the results of the tag depends on whether it is a container or standalone tag. A container tag is one which has an end tag, i.e. [tag] stuff [/tag]. A standalone tag has no end tag, as in [area href=somepage]. (Note that [page ...] and [order ..] are not container tags.)

A container tag will have its output re-parsed for more Interchange tags by default. If you wish to inhibit this behavior, you must explicitly set the attribute reparse to 0. Note that you will almost always wish the default action. The only container ITL tag that doesn't have reparse set by default is [mvasp].

With some exceptions ([include] is among them) among them) the output of a standalone tag will not be re-interpreted for Interchange tag constructs. All tags accept the INTERPOLATE=1 tag modifier, which causes the interpretation to take place. It is frequent that you will not want to interpret the contents of a [set variable] TAGS [/set] pair, as that might contain tags which should only be upon evaluating an order profile, search profile, or mv_click operation. If you wish to perform the evaluation at the time a variable is set, you would use [set name=variable interpolate=1] TAGS [/set].

1.1. Looping tags and Sub-tags

Certain tags are not standalone; these are the ones that are interpreted as part of a surrounding looping tag like [loop], [item-list], [query], or [region].

    [PREFIX-accessories]
    [PREFIX-alternate]
    [PREFIX-calc]
    [PREFIX-change]
    [PREFIX-change]
    [PREFIX-code]
    [PREFIX-data]
    [PREFIX-description]
    [PREFIX-discount]
    [PREFIX-field]
    [PREFIX-increment]
    [PREFIX-last]
    [PREFIX-match]
    [PREFIX-modifier]
    [PREFIX-next]
    [PREFIX-param]
    [PREFIX-price]
    [PREFIX-quantity]
    [PREFIX-subtotal]
    [if-PREFIX-data]
    [if-PREFIX-field]
    [modifier-name]
    [quantity-name]

PREFIX represents the prefix that is used in that looping tag. They are only interpreted within their container and only accept positional parameters. The default prefixes:

    Tag           Prefix     Examples
    -----        --------   ----------
    [loop]        loop       [loop-code], [loop-field price], [loop-increment]
    [item-list]   item       [item-code], [item-field price], [item-increment]
    [search-list] item       [item-code], [item-field price], [item-increment]
    [query]       sql        [sql-code], [sql-field price], [sql-increment]

Sub-tag behavior is consistent among the looping tags.

There are two types of looping lists; ARRAY and HASH.

An array list is the normal output of a [query], a search, or a [loop] tag. It returns from 1 to N return fields, defined in the mv_return_fields or rf variable or implicitly by means of a SQL field list. The two queries below are essentially identical:

    [query sql="select foo, bar from products"]
    [/query]

    [loop search="
                    ra=yes
                    fi=products
                    rf=foo,bar
    "]

Both will return an array of arrays consisting of the foo column and the bar column. The Perl data structure would look like:

    [
        ['foo0', 'bar0'],
        ['foo1', 'bar1'],
        ['foo2', 'bar2'],
        ['fooN', 'barN'],
    ]

A hash list is the normal output of the [item-list] tag. It returns the value of all return fields in an array of hashes. A normal [item-list] return might look like:

    [
        {
            code     => '99-102',
            quantity => 1,
            size     => 'XL',
            color    => 'blue',
            mv_ib    => 'products',
        },
        {
            code     => '00-341',
            quantity => 2,
            size     => undef,
            color    => undef,
            mv_ib    => 'products',
        },

    ]

You can also return hash lists in queries:

    [query sql="select foo, bar from products" type=hashref]
    [/query]

Now the data structure will look like:

    [
        { foo => 'foo0', bar => 'bar0' },
        { foo => 'foo1', bar => 'bar1' },
        { foo => 'foo2', bar => 'bar2' },
        { foo => 'fooN', bar => 'barN' },
    ]

[PREFIX-accessories arglist]

[PREFIX-alternate N] DIVISIBLE [else] NOT DIVISIBLE [/else][/PREFIX-alternate]

        [item-alternate 2]EVEN[else]ODD[/else][/item-alternate]
        [item-alternate 3]BY 3[else]NOT by 3[/else][/item-alternate]

[PREFIX-calc] 2 + [item-field price] [/PREFIX-calc]

[PREFIX-change][conditoon] ... [/condition] TEXT [/PREFIX-change]

     <TABLE>
     <TR><TH>Category</TH><TH>Subcategory</TH><TH>Product</TH></TR>
     [search-list]
     <TR>
        <TD>
             [item-change cat]
    
             [condition][item-field category][/condition]
    
                     [item-field category]
             [else]
                     &nbsp;
             [/else]
             [/item-change cat]
        </TD>
        <TD>
             [item-change sub]
    
             [condition][item-field subcategory][/condition]
    
                     [item-field subcategory]
             [else]
                     &nbsp;
             [/else]
             [/item-change sub]
        </TD>
        <TD> [item-field name] </TD>
     [/search-list]
     </TABLE>

[PREFIX-code]

[PREFIX-data table field]

[PREFIX-description]

[PREFIX-discount]

[PREFIX-field]

        1. The first ProductFiles entry.
        2. Additional ProductFiles in the order they occur.
        3. The attribute value for the item in a hash list.
        4. Blank
        [loop search="
                        fi=foo
                        se=bar
                    "]
    
        [loop-field foo_field]
        [/loop]

[PREFIX-increment]

[PREFIX-last] CONDITION [/PREFIX-last]

[PREFIX-modifier attribute]

[PREFIX-next] CONDITION [/PREFIX-next]

[PREFIX-param name]

[PREFIX-param N]

        [query prefix=prefix sql="select foo, bar from baz where foo=buz"]
            [prefix-code]  [prefix-param foo]  [prefix-param bar]
        [/query]

[PREFIX-price]

[PREFIX-quantity]

[PREFIX-subtotal]

[if-PREFIX-data table field] IF text [else] ELSE text [/else] [/if-PREFIX-data]

[if-PREFIX-field field] IF text [else] ELSE text [/else] [/if-PREFIX-field]

[modifier-name attribute]

        1. attribute0
        2. attribute1
        3. attribute2

[quantity-name]

        1. quantity0
        2. quantity1
        3. quantity2

2. Tags

Each ITL tag is show below. Calling information is defined for the main tag, sub-tags are described in Sub-tags.

2.1. accessories

CALL INFORMATION

        $Tag->accessories(
            {
             code => VALUE,
             arg => VALUE,
            }
        )
    
     OR
    
        $Tag->accessories($code, $arg, $ATTRHASH);
                base ==> table
                col ==> column
                database ==> table
                db ==> table
                field ==> column
                key ==> code
                row ==> code

DESCRIPTION

        UseModifier        size color
        item  group  quantity  code  mv_ib  mv_mi  mv_si
       [item_accessories attribute, type*, column*, table*, name*, outboard*]
    
       [accessories code=sku
                    attribute=modifier
                    type="select|radio|display|show|checkbox|text|textarea"*
                    column=column_name*
                    table=db_table*
                    name=varname
                    outboard=key
                    passed="value=label, value2, value3=label 3" ]
          select          Builds a dropdown <SELECT> menu for the attribute.
                          NOTE: This is the default.
        
          multiple        Builds a multiple dropdown <SELECT> menu for the
                          attribute.  The size is equal to the number of
                          option choices.
        
          display         Shows the label text for *only the selected option*.
        
          show            Shows the option choices (no labels) for the option.
        
          radio           Builds a radio box group for the item, with spaces
                          separating the elements.
        
          radio nbsp      Builds a radio box group for the item, with &nbsp;
                          separating the elements.
        
          radio left n    Builds a radio box group for the item, inside a
                          table, with the checkbox on the left side. If "n"
                          is present and is a digit from 2 to 9, it will align
                          the options in that many columns.
        
          radio right n   Builds a radio box group for the item, inside a
                          table, with the checkbox on the right side. If "n"
                          is present and is a digit from 2 to 9, it will align
                          the options in that many columns.
        
          check           Builds a checkbox group for the item, with spaces
                          separating the elements.
        
          check nbsp      Builds a checkbox group for the item, with &nbsp;
                          separating the elements.
        
          check left n    Builds a checkbox group for the item, inside a
                          table, with the checkbox on the left side. If "n"
                          is present and is a digit from 2 to 9, it will align
                          the options in that many columns.
        
          check right n   Builds a checkbox group for the item, inside a
                          table, with the checkbox on the right side. If "n"
                          is present and is a digit from 2 to 9, it will align
                          the options in that many columns.
        
          textarea_XX_YY  A textarea with XX columns and YY rows
        
          text_XX         A text box with XX size in characters
        
          combo           Special type, used with nullselect filter,
                          for selecting from a list or inputting a
                          new value
        
          reverse_combo   Special type, used with last_non_null filter,
                          for selecting from a list or inputting a
                          new value -- differs from combo in order of
                          presentation
        
          move_combo      Special type, used with null_to_space or
                          null_to_comma filter, for selecting multiple non-ordered
                          values from a list or inputting into a textarea
        
          links           Produces a series of links based on the option
                          values. The base form value is passed via the
                                          form parameter, just like in an [area ...] or
                                          [page ...] tag, and the value is named with
                                          the passed NAME attribute.
                [accessories
                    type=select
                        name=color
                        passed="=--select--, blue=Blue, green=Sea Green"
                ]
                <SELECT NAME="color">
                <OPTION VALUE="">--select--
                <OPTION VALUE="blue">Blue
                <OPTION VALUE="green">Sea Green
                </SELECT>
                [accessories
                    type=links
                        name=color
                        passed="=--select--, blue=Blue, green=Sea Green"
                ]
            <A HREF="VENDURL/MV_PAGE?mv_action=return&color=blue">Blue</A><BR>
            <A HREF="VENDURL/MV_PAGE?mv_action=return&color=green">Sea Green</A>
        
            where VENDURL is your Interchange URL for the catalog
                  MV_PAGE is the current page
        name=Label Text, name=Label Text*
        [item_accessories color]
        <SELECT NAME="mv_order_color">
        <OPTION VALUE="beige">Almond
        <OPTION VALUE="gold">Harvest Gold
        <OPTION SELECTED>White
        <OPTION VALUE="green">Avocado
        </SELECT>
        name=Label Text, name=Label Text*
        [accessories TK112 color]
        <SELECT NAME="mv_order_color">
        <OPTION VALUE="beige">Almond
        <OPTION VALUE="gold">Harvest Gold
        <OPTION SELECTED>White
        <OPTION VALUE="green">Avocado
        </SELECT>
            <SELECT NAME="[modifier-name size]">
            [loop option="[modifier-name size]" list="S, M, L, XL"]
            <OPTION> [loop-code] -- [price code="[item-code]" size="[loop-code]"]
            [/loop]
            </SELECT>

2.2. and

CALL INFORMATION

        $Tag->and(
            {
             type => VALUE,
             term => VALUE,
             op => VALUE,
             compare => VALUE,
            }
        )
    
     OR
    
        $Tag->and($type, $term, $op, $compare);
                base ==> type
                comp ==> compare
                operator ==> op

DESCRIPTION

            [if value fname]
            [and value lname]
            Both first and last name are present.
            [else]
            Missing one of "fname" and "lname" from $Values.
            [/else]
            [/if]

2.3. area

CALL INFORMATION

        $Tag->area(
            {
             href => VALUE,
             arg => VALUE,
            }
        )
    
     OR
    
        $Tag->area($href, $arg, $ATTRHASH);

DESCRIPTION

        <A HREF="[area href=scan arg="
                                         se=Impressionists
                                         sf=category
                                    "
                                ]">Impressionists</A>
        <A HREF="[area ord/basket]">Check basket</A>
        <A MV="area dir/page" HREF="dir/page.html">
       <A HREF="[area href=catalog]" ALT="Main catalog page">Catalog Home</A>
       <A HREF="[href href=catalog]" ALT="Main catalog page">Catalog Home</A>
            <A HREF="[area form="
                    mv_order_item=99-102
                    mv_order_size=L
                    mv_order_quantity=1
                    mv_separate_items=1
                    mv_todo=refresh"
            ]"> Order t-shirt in Large size </A>

2.4. attr_list

CALL INFORMATION

        $Tag->attr_list(
            {
             hash => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->attr_list($hash, $BODY);

DESCRIPTION

            [perl tables=products]
                    my %opt = (
                            hashref => 1,
                            sql => 'select * from  products',
                    );
                    my $ary_of_hash = $Db{products}->query(\%opt);
                    my $template = <<EOF;
    {sku} - {description} - {price|Call for price}
            {image?}<IMG SRC="{image}">{/image?}
            {image:}No image available{/image:}
    EOF
                    foreach my $ref (@$ary_of_hash) {
                            $out .= $Tag->attr_list($template, $ref);
                    }
                    return $out;
            [/perl]

2.5. banner

CALL INFORMATION

        $Tag->banner(
            {
             category => VALUE,
            }
        )
    
     OR
    
        $Tag->banner($category, $ATTRHASH);

DESCRIPTION

2.6. bounce

CALL INFORMATION

        $Tag->bounce(
            {
             href => VALUE,
             if => VALUE,
            }
        )
    
     OR
    
        $Tag->bounce($href, $if);

DESCRIPTION

            [if !scratch real_user]
            [bounce href="[area violation]"]
            [/if]
            [if value go_home]
            [bounce href="/"]
            [/if]
            [if value go_home]
            [bounce href="__SERVER_NAME__/"]
            [/if]
    
            [if value go_home]
            [bounce href="/"]
            [/if]

2.7. calc

CALL INFORMATION

        $Tag->calc(
            {
            },
            BODY
        )
    
     OR
    
        $Tag->calc($BODY);

DESCRIPTION

        [calc] 2 + 2 [/calc]
        4

2.8. cart

CALL INFORMATION

        $Tag->cart(
            {
             name => VALUE,
            }
        )
    
     OR
    
        $Tag->cart($name);

DESCRIPTION

2.9. catch

CALL INFORMATION

        $Tag->catch(
            {
             label => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->catch($label, $ATTRHASH, $BODY);

DESCRIPTION

2.10. cgi

CALL INFORMATION

        $Tag->cgi(
            {
             name => VALUE,
            }
        )
    
     OR
    
        $Tag->cgi($name);

DESCRIPTION

            http://VENDURL/pagename?foo=bar

2.11. checked

CALL INFORMATION

        $Tag->checked(
            {
             name => VALUE,
             value => VALUE,
            }
        )
    
     OR
    
        $Tag->checked($name, $value, $ATTRHASH);

DESCRIPTION

        <INPUT TYPE=radio NAME=foo
                VALUE=on [checked name=foo value=on default=1]>
        <INPUT TYPE=radio NAME=foo
                VALUE=off [checked name=foo value=off]>
        <INPUT TYPE=checkbox NAME=foo
                VALUE=1 [checked name=foo value=1 default=1]>
        [value name=foo set=""]

2.12. control

CALL INFORMATION

        $Tag->control(
            {
             name => VALUE,
             default => VALUE,
            }
        )
    
     OR
    
        $Tag->control($name, $default, $ATTRHASH);

DESCRIPTION

2.13. control_set

CALL INFORMATION

        $Tag->control_set(
            {
             index => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->control_set($index, $ATTRHASH, $BODY);

DESCRIPTION

2.14. counter

CALL INFORMATION

        $Tag->counter(
            {
             file => VALUE,
            }
        )
    
     OR
    
        $Tag->counter($file, $ATTRHASH);
                name ==> file

DESCRIPTION

2.15. currency

CALL INFORMATION

        $Tag->currency(
            {
             convert => VALUE,
             noformat => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->currency($convert, $noformat, $BODY);

DESCRIPTION

        [currency]4[/currency]
        4.00
        [currency convert=1] [calc] 500.00 + 1000.00 [/calc] [/currency]

2.16. data

CALL INFORMATION

        $Tag->data(
            {
             table => VALUE,
             field => VALUE,
             key => VALUE,
            }
        )
    
     OR
    
        $Tag->data($table, $field, $key, $ATTRHASH);
                base ==> table
                code ==> key
                col ==> field
                column ==> field
                database ==> table
                name ==> field
                row ==> key

DESCRIPTION

        accesses           Accesses within the last 30 seconds
        arg                The argument passed in a [page ...] or [area ...] tag
        browser            The user browser string
        cybercash_error    Error from last CyberCash operation
        cybercash_result   Hash of results from CyberCash (access with usertag)
        host               Interchange's idea of the host (modified by DomainTail)
        last_error         The last error from the error logging
        last_url           The current Interchange path_info
        logged_in          Whether the user is logged in (add-on UserDB feature)
        pageCount          Number of unique URLs generated
        prev_url           The previous path_info
        referer            HTTP_REFERER string
        ship_message       The last error messages from shipping
        source             Source of original entry to Interchange
        time               Time (seconds since Jan 1, 1970) of last access
        user               The REMOTE_USER string
        username           User name logged in as (UserDB feature)

2.17. default

CALL INFORMATION

        $Tag->default(
            {
             name => VALUE,
             default => VALUE,
            }
        )
    
     OR
    
        $Tag->default($name, $default, $ATTRHASH);

DESCRIPTION

2.18. description

CALL INFORMATION

        $Tag->description(
            {
             code => VALUE,
             base => VALUE,
            }
        )
    
     OR
    
        $Tag->description($code, $base);

DESCRIPTION

2.19. discount

CALL INFORMATION

        $Tag->discount(
            {
             code => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->discount($code, $BODY);

DESCRIPTION

        1. A discount for one particular item code (code/key is the item-code)
        2. A discount applying to all item codes (code/key is ALL_ITEMS)
        3. A discount applied after all items are totaled
           (code/key is ENTIRE_ORDER)
        [discount ALL_ITEMS] $s * .8 [/discount]
        [discount code=ALL_ITEMS] $s * .8 [/discount]
        [discount 00-342] $s * .75 [/discount]
        [discount ENTIRE_ORDER] $s - 5 [/discount]
        [discount ALL_ITEMS][/discount]
        [discount 00-343]
        return $s if $q == 1;
        my $p = $s/$q;
        my $t = ($q - 1) * $p;
        $t .= 0.01;
        return $t;
        [/discount]
        [item-list]
        Discount for [item-code]: [item-discount]
        [/item-list]
        [item-list]
        Discounted subtotal for [item-code]: [currency][calc]
                                                [item-price noformat] * [item-quantity]
                                                [/calc][/currency]
        [/item-list]
      [either][value must_be_here][or][bounce href="[area incomplete]"][/either]

2.20. discount_subtotal

DESCRIPTION

2.21. dump

CALL INFORMATION

        $Tag->dump(
            {
            }
        )
    
     OR
    
        $Tag->dump($);

DESCRIPTION

2.22. ecml

CALL INFORMATION

        $Tag->ecml(
            {
             name => VALUE,
             function => VALUE,
            }
        )
    
     OR
    
        $Tag->ecml($name, $function, $ATTRHASH);

DESCRIPTION

2.23. either

CALL INFORMATION

        $Tag->either(
            {
            },
            BODY
        )
    
     OR
    
        $Tag->either($BODY);

DESCRIPTION

2.24. error

CALL INFORMATION

        $Tag->error(
            {
             name => VALUE,
            }
        )
    
     OR
    
        $Tag->error($name, $ATTRHASH);

DESCRIPTION

        [error var options]
            var is the error name, e.g. "session"
        [if errors]
        <FONT SIZE="+1" COLOR=RED>
            There were errors in your form submission.
        </FONT>
        <BLOCKQUOTE>
            [error all=1 show_error=1 joiner="<BR>"]
        </BLOCKQUOTE>
        [/if]
                <FONT COLOR=RED>label_str<SMALL><I>(%s)</I></SMALL></FONT>

2.25. export

CALL INFORMATION

        $Tag->export(
            {
             table => VALUE,
            }
        )
    
     OR
    
        $Tag->export($table, $ATTRHASH);
                base ==> table
                database ==> table

DESCRIPTION

2.26. field

CALL INFORMATION

        $Tag->field(
            {
             name => VALUE,
             code => VALUE,
            }
        )
    
     OR
    
        $Tag->field($name, $code);
                col ==> name
                column ==> name
                field ==> name
                key ==> code
                row ==> code

DESCRIPTION

2.27. file

CALL INFORMATION

        $Tag->file(
            {
             name => VALUE,
             type => VALUE,
            }
        )
    
     OR
    
        $Tag->file($name, $type);

DESCRIPTION

2.28. filter

CALL INFORMATION

        $Tag->filter(
            {
             op => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->filter($op, $BODY);

DESCRIPTION

        [filter op="name namecase"]WOOD, Grant[/filter]
        Grant Wood
        [data table=products column=artist key=99-102 filter="name namecase"]
            'cgi' =>    sub {
                            return $CGI::values(shift);
                        },
            'digits' => sub {
                            my $val = shift;
                            $val =~ s/\D+//g;
                            return $val;
                        },
            'digits_dot' => sub {
                            my $val = shift;
                            $val =~ s/[^\d.]+//g;
                            return $val;
                        },
            'dos' =>    sub {
                            my $val = shift;
                            $val =~ s/\r?\n/\r\n/g;
                            return $val;
                        },
            'entities' => sub {
                            return HTML::Entities::encode(shift);
                        },
            'gate' =>   sub {
                            my ($val, $var) = @_;
                            return '' unless $::Scratch->{$var};
                            return $val;
                        },
            'lc' =>     sub {
                            return lc(shift);
                        },
            [filter op="uc lookup.country.name"]us[/filter]
            'lookup' => sub {
                                my ($val, $tag, $table, $column) = @_;
                                return tag_data($table, $column, $val) || $val;
                        },
            'mac' =>    sub {
                            my $val = shift;
                            $val =~ s/\r?\n|\r\n?/\r/g;
                            return $val;
                        },
            'name' => sub {
                            my $val = shift;
                            return $val unless $val =~ /,/;
                            my($last, $first) = split /\s*,\s*/, $val, 2;
                            return "$first $last";
                        },
            'namecase' => sub {
                            my $val = shift;
                            $val =~ s/([A-Z]\w+)/\L\u$1/g;
                            return $val;
                        },
            'no_white' =>   sub {
                            my $val = shift;
                            $val =~ s/\s+//g;
                            return $val;
                        },
            'pagefile' => sub {
                            $_[0] =~ s:^[./]+::;
                            return $_[0];
                        },
            'sql'       => sub {
                            my $val = shift;
                            $val =~ s:':'':g; # '
                            return $val;
                        },
            'strip' =>  sub {
                            my $val = shift;
                            $val =~ s/^\s+//;
                            $val =~ s/\s+$//;
                            return $val;
                        },
            'text2html' => sub {
                            my $val = shift;
                            $val =~ s|\r?\n\r?\n|<P>|;
                            $val =~ s|\r?\n|<BR>|;
                            return $val;
                        },
            'uc' =>     sub {
                            return uc(shift);
                        },
            'unix' =>   sub {
                            my $val = shift;
                            $val =~ s/\r?\n/\n/g;
                            return $val;
                        },
            'urlencode' => sub {
                            my $val = shift;
                            $val =~ s|[^\w:]|sprintf "%%%02x", ord $1|eg;
                            return $val;
                        },
            'value' =>  sub {
                            return $::Values->(shift);
                        },
            'word' =>   sub {
                            my $val = shift;
                            $val =~ s/\W+//g;
                            return $val;
                        },
            package Vend::Interpolate;
        
            $Filter{reverse} = sub { $val = shift; return scalar reverse $val  };

2.29. flag

CALL INFORMATION

        $Tag->flag(
            {
             type => VALUE,
            }
        )
    
     OR
    
        $Tag->flag($type, $ATTRHASH);
                flag ==> type
                name ==> type

DESCRIPTION

2.30. fly_list

CALL INFORMATION

        $Tag->fly_list(
            {
             code => VALUE,
             base => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->fly_list($code, $base, $BODY);

DESCRIPTION

       [fly-list]
        (contents of flypage.html)
       [/fly-list]
        [page 00-0011] One way to display the Mona Lisa [/page]
        [page flypage2 00-0011] Another way to display the Mona Lisa [/page]

2.31. fly_tax

CALL INFORMATION

        $Tag->fly_tax(
            {
             area => VALUE,
            }
        )
    
     OR
    
        $Tag->fly_tax($area);

DESCRIPTION

2.32. goto

CALL INFORMATION

        $Tag->goto(
            {
             name => VALUE,
             if => VALUE,
            }
        )
    
     OR
    
        $Tag->goto($name, $if);

DESCRIPTION

2.33. handling

CALL INFORMATION

        $Tag->handling(
            {
             mode => VALUE,
            }
        )
    
     OR
    
        $Tag->handling($mode, $ATTRHASH);
                carts ==> cart
                modes ==> mode
                name ==> mode
                tables ==> table

DESCRIPTION

2.34. harness

CALL INFORMATION

        $Tag->harness(
            {
            },
            BODY
        )
    
     OR
    
        $Tag->harness($ATTRHASH, $BODY);

DESCRIPTION

2.35. html_table

CALL INFORMATION

        $Tag->html_table(
            {
            },
            BODY
        )
    
     OR
    
        $Tag->html_table($ATTRHASH, $BODY);

DESCRIPTION

2.36. if

CALL INFORMATION

        $Tag->if(
            {
             type => VALUE,
             term => VALUE,
             op => VALUE,
             compare => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->if($type, $term, $op, $compare, $BODY);
                base ==> type
                comp ==> compare
                condition ==> compare
                operator ==> op

DESCRIPTION

        [if type term op compare]
        [then]
                                    If true, this is printed on the document.
                                    The [then] [/then] is optional in most
                                    cases. If ! is prepended to the type
                                    setting, the sense is reversed and
                                    this will be output for a false condition.
        [/then]
        [elsif type term op compare]
                                    Optional, tested when if fails
        [/elsif]
        [else]
                                    Optional, printed when all above fail
        [/else]
        [/if]
        [if type=explicit compare=`$perl_code`]
            Displayed if valid Perl CODE returns a true value.
        [/if]
        [if value name =~ /^mike/]
                                    This is the if with Mike.
        [elsif value name =~ /^sally/]
                                    This is an elsif with Sally.
        [/elsif]
        [elsif value name =~ /^pat/]
                                    This is an elsif with Pat.
        [/elsif]
        [else]
                                    This is the else, no name I know.
        [/else]
        [/if]
        [if value name =~ /[value b_name]/]
            Shipping name matches billing name.
        [/if]
        [if base=value field=name op="=~" compare="/[value b_name]/"]
            Shipping name matches billing name.
        [/if]
        [if type=explicit compare=`
                            $Value->{name} =~ /$Value->{b_name}/
                            `]
            Shipping name matches billing name.
        [/if]
        [if value name =~ /Mike/]
        [or value name =~ /Jean/]
        Your name is Mike or Jean.
        [/if]
    
        [if value name =~ /Mike/]
        [and value state =~ /OH/]
        Your name is Mike and you live in Ohio.
        [/if]
            [if config CreditCardAuto]
            Auto credit card validation is enabled.
            [/if]
            [if data products::size::99-102]
            There is size information.
            [else]
            No size information.
            [/else]
            [/if]
        
            [if data products::size::99-102 =~ /small/i]
            There is a small size available.
            [else]
            No small size available.
            [/else]
            [/if]
            [if discount 99-102]
            Item is discounted.
            [/if]
            [if explicit]
            [condition]
                $country = '[value country]';
                return 1 if $country =~ /u\.?s\.?a?/i;
                return 0;
            [/condition]
            You have indicated a US address.
            [else]
            You have indicated a non-US address.
            [/else]
            [/if]
            [if type=explicit compare="__MYVAR__"] .. [/if]
            [if file /home/user/www/images/[item-code].gif]
            <IMG SRC="[item-code].gif">
            [/if]
          [if items]You have items in your shopping cart.[/if]
        
          [if items layaway]You have items on layaway.[/if]
          [if ordered 99-102] Item 99-102 is in your cart. [/if]
            Checks the status of an item on order, true if item
            99-102 is in the main cart.
        
          [if ordered 99-102 layaway] ... [/if]
            Checks the status of an item on order, true if item
            99-102 is in the layaway cart.
        
          [if ordered 99-102 main size] ... [/if]
            Checks the status of an item on order in the main cart,
            true if it has a size attribute.
        
          [if ordered 99-102 main size =~ /large/i] ... [/if]
            Checks the status of an item on order in the main cart,
            true if it has a size attribute containing 'large'.
        
            To make sure it is exactly large, you could use:
        
          [if ordered 99-102 main size eq 'large'] ... [/if]
            [if scratch mv_separate_items]
            ordered items will be placed on a separate line.
            [else]
            ordered items will be placed on the same line.
            [/else]
            [/if]
        [if scratch frames]
            __BUTTONBAR_FRAMES__
        [else]
            __BUTTONBAR__
        [/else]
        [/if]
        [if value mv_match_count != 1]
            [value mv_match_count] matches found.
        [else]
            Only one match was found.
        [/else]
        [/if]
        ==  numeric equivalence
        eq  string equivalence
        >   numeric greater-than
        gt  string greater-than
        <   numeric less-than
        lt  string less-than
        !=  numeric non-equivalence
        ne  string equivalence

2.37. import

CALL INFORMATION

        $Tag->import(
            {
             table => VALUE,
             type => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->import($table, $type, $ATTRHASH, $BODY);
                base ==> table
                database ==> table

DESCRIPTION

        [import table=table_name
                type=(TAB|PIPE|CSV|%%|LINE)
                continue=(NOTES|UNIX|DITTO)
                separator=c]
        [import table=orders]
        code: [value mv_order_number]
        shipping_mode: [shipping-description]
        status: pending
        [/import]
    
        [import table=orders]
        shipping_mode: [shipping-description]
        status: pending
        code: [value mv_order_number]
        [/import]

2.38. include

CALL INFORMATION

        $Tag->include(
            {
             file => VALUE,
             locale => VALUE,
            }
        )
    
     OR
    
        $Tag->include($file, $locale);

DESCRIPTION

2.39. index

CALL INFORMATION

        $Tag->index(
            {
             table => VALUE,
            }
        )
    
     OR
    
        $Tag->index($table, $ATTRHASH);
                base ==> table
                database ==> table

DESCRIPTION

2.40. input_filter

CALL INFORMATION

        $Tag->input_filter(
            {
             name => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->input_filter($name, $ATTRHASH, $BODY);
                ops ==> op
                var ==> name
                variable ==> name

DESCRIPTION

2.41. item_list

CALL INFORMATION

        $Tag->item_list(
            {
             name => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->item_list($name, $ATTRHASH, $BODY);
                cart ==> name

DESCRIPTION

              [item-last][calc]
                return -1 if '[item-field weight]' eq '';
                return 1 if '[item-field weight]' < 1;
                return 0;
                [/calc][/item-last]
              [item-next][calc][item-field weight] < 1[/calc][/item-next]

2.42. label

CALL INFORMATION

        $Tag->label(
            {
             name => VALUE,
            }
        )
    
     OR
    
        $Tag->label($name);

DESCRIPTION

2.43. log

CALL INFORMATION

        $Tag->log(
            {
             file => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->log($file, $ATTRHASH, $BODY);
                arg ==> file

DESCRIPTION

2.44. loop

CALL INFORMATION

        $Tag->loop(
            {
             list => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->loop($list, $ATTRHASH, $BODY);
                arg ==> list
                args ==> list

DESCRIPTION

        <TABLE><TR MV="loop 1 2 3"><TD>[loop-code]</TD></TR></TABLE>
        [loop arg="A B C"]
            [loop prefix=mid arg="[loop-code]1 [loop-code]2 [loop-code]3"]
                [loop prefix=inner arg="X Y Z"]
                    [mid-code]-[inner-code]
                [/loop]
            [/loop]
        [/loop]
        [loop search="se=Americana/sf=category"]
            [loop-code] [loop-field title]
        [/loop]
              [loop-last][calc]
                return -1 if '[loop-field weight]' eq '';
                return 1 if '[loop-field weight]' < 1;
                return 0;
                [/calc][/loop-last]
              [loop-next][calc][loop-field weight] < 1[/calc][/loop-next]

2.45. mail

CALL INFORMATION

        $Tag->mail(
            {
             to => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->mail($to, $ATTRHASH, $BODY);

DESCRIPTION

2.46. mvasp

CALL INFORMATION

        $Tag->mvasp(
            {
             tables => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->mvasp($tables, $ATTRHASH, $BODY);
                table ==> tables

DESCRIPTION

2.47. nitems

CALL INFORMATION

        $Tag->nitems(
            {
             name => VALUE,
            }
        )
    
     OR
    
        $Tag->nitems($name, $ATTRHASH);

DESCRIPTION

2.48. onfly

CALL INFORMATION

        $Tag->onfly(
            {
             code => VALUE,
             quantity => VALUE,
            }
        )
    
     OR
    
        $Tag->onfly($code, $quantity, $ATTRHASH);

DESCRIPTION

2.49. options

CALL INFORMATION

        $Tag->options(
            {
             code => VALUE,
            }
        )
    
     OR
    
        $Tag->options($code, $ATTRHASH);

DESCRIPTION

2.50. or

CALL INFORMATION

        $Tag->or(
            {
             type => VALUE,
             term => VALUE,
             op => VALUE,
             compare => VALUE,
            }
        )
    
     OR
    
        $Tag->or($type, $term, $op, $compare);
                base ==> type
                comp ==> compare
                operator ==> op

DESCRIPTION

2.51. order

CALL INFORMATION

        $Tag->order(
            {
             code => VALUE,
             quantity => VALUE,
            }
        )
    
     OR
    
        $Tag->order($code, $quantity);

DESCRIPTION

      Order a [order TK112]Toaster[/order] today.

2.52. page

CALL INFORMATION

        $Tag->page(
            {
             href => VALUE,
             arg => VALUE,
            }
        )
    
     OR
    
        $Tag->page($href, $arg, $ATTRHASH);
                base ==> arg

DESCRIPTION

            [page form="
                    mv_order_item=99-102
                    mv_order_size=L
                    mv_order_quantity=1
                    mv_separate_items=1
                    mv_todo=refresh"] Order t-shirt in Large size </A>
         [page scan
                se=Impressionists
                sf=category]
            Impressionist Paintings
         [/page]
         <A HREF="/cgi-bin/vlink/scan/se=Impressionists/sf=category">
            Impressionist Paintings
         </A>
        [page href=scan
              arg=|
                    se="Something with spaces"
              |]
      DL  mv_raw_dict_look
      MM  mv_more_matches
      SE  mv_raw_searchspec
      ac  mv_all_chars
      ar  mv_arg
      bd  mv_base_directory
      bs  mv_begin_string
      ck  mv_cache_key
      co  mv_coordinate
      cs  mv_case
      cv  mv_verbatim_columns
      de  mv_dict_end
      df  mv_dict_fold
      di  mv_dict_limit
      dl  mv_dict_look
      do  mv_dict_order
      dp  mv_delay_page
      dr  mv_record_delim
      em  mv_exact_match
      er  mv_spelling_errors
      fi  mv_search_file
      fm  mv_first_match
      fn  mv_field_names
      hs  mv_head_skip
      id  mv_session_id
      il  mv_index_delim
      ix  mv_index_delim
      lb  mv_search_label
      lo  mv_list_only
      lr  mv_line_return
      lr  mv_search_line_return
      ml  mv_matchlimit
      mm  mv_max_matches
      mp  mv_profile
      ms  mv_min_string
      ne  mv_negate
      np  mv_nextpage
      nu  mv_numeric
      op  mv_column_op
      os  mv_orsearch
      pc  mv_pc
      ra  mv_return_all
      rd  mv_return_delim
      rf  mv_return_fields
      rg  mv_range_alpha
      rl  mv_range_look
      rm  mv_range_min
      rn  mv_return_file_name
      rr  mv_return_reference
      rs  mv_return_spec
      rx  mv_range_max
      se  mv_searchspec
      sf  mv_search_field
      si  mv_search_immediate
      sp  mv_search_page
      sq  mv_sql_query
      st  mv_searchtype
      su  mv_substring_match
      tf  mv_sort_field
      to  mv_sort_option
      un  mv_unique
      va  mv_value
         [page scan se=Surreal/se=Gogh/os=yes/su=yes/sf=artist/sf=category]
            Van Gogh -- compare to surrealists
         [/page]
         [page scan se="Van Gogh"&sp=lists/surreal&os=yes&su=yes&sf=artist&sf=category]
            Van Gogh -- compare to surrealists
         [/page]
            [page scan
                se="Van Gogh"
                sp=lists/surreal
                os=yes
                su=yes
                sf=artist
                sf=category
            ] Van Gogh -- compare to surrealists [/page]

[/page]

      [page shirts]Our shirt collection[/page].

2.53. perl

CALL INFORMATION

        $Tag->perl(
            {
             tables => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->perl($tables, $ATTRHASH, $BODY);
                table ==> tables

DESCRIPTION

        [perl]
            $name    = $Values->{name};
            $browser = $Session->{browser};
            return "Hi, $name! How do you like your $browser?
        [/perl]
        <PRE mv=perl>
            $name    = $Values->{name};
            $browser = $Session->{browser};
            return "Hi, $name! How do you like your $browser?
        </PRE>
      $CGI->{key}               Hash reference to raw submitted values
      $CGI_array->{key}         Arrays of submitted values
      $Carts->{cartname}        Direct reference to shopping carts
      $Config->{key}            Direct reference to $Vend::Cfg
      $DbSearch->array(@args)   Do a DB search and get results
      $Document->header()       Writes header lines
      $Document->send()         Writes to output
      $Document->write()        Writes to page
      $Scratch->{key}           Direct reference to scratch area
      $Session->{key}           Direct reference to session area
      $Tag->tagname(@args)      Call a tag as a routine (UserTag too!)
      $TextSearch->array(@args) Do a text search and get results
      $Values->{key}            Direct reference to user form values
      $Variable->{key}          Config variables (same as $Config->{Variable});
      &HTML($html)              Same as $Document->write($html);
      &Log($msg)                Log to the error log
        [perl tables=products]
            $result = "You asked about $Values->{code}. Here is the description: ";
            $result .= $Tag->data('products', 'description', $Values->{code});
            return $result;
        [/perl]

2.54. price

CALL INFORMATION

        $Tag->price(
            {
             code => VALUE,
            }
        )
    
     OR
    
        $Tag->price($code, $ATTRHASH);
                base ==> mv_ib

DESCRIPTION

            code       Product code/SKU
            base       Only search in product table *base*
            quantity   Price for a quantity
            discount   If true(1), check discount coupons and apply
            noformat   If true(1), don't apply currency formatting
       CommonAdjust  pricing:q2,q5,q10,q25, ;products:price, ==size:pricing
        2-4      Column *q2*
        5-9      Column *q5*
        10-24    Column *q10*
        25 up    Column *q25*
        [price code=99-102 quantity=10 size=XL]
      code    q2   q5   q10  q25  XL
      99-102  10   9    8    7    .50
      code    description   price    size
      99-102  T-Shirt       10.00    S=Small, M=Medium, L=Large*, XL=Extra Large
      TAG                                             DISPLAYS
      ----------------------------------             ---------------------------
      [price 99-102]                                  $10.00
      [price code="99-102"]                           $10.00
      [price code="99-102" quantity=1]                $10.00
      [price code="99-102" noformat=1]                10
      [price code="99-102" quantity=5]                $9.00
      [price code="99-102" quantity=5 size=XL]        $9.50
      [price code="99-102" size=XL]                   $10.50
      [price code="99-102" size=XL noformat=1]        10.5
        [price code="99-102"]            -->   $10.00
        [price code="99-102" discount=1] -->   $9.00

2.55. process

CALL INFORMATION

        $Tag->process(
            {
             target => VALUE,
             secure => VALUE,
            }
        )
    
     OR
    
        $Tag->process($target, $secure, $ATTRHASH);

DESCRIPTION

2.56. profile

CALL INFORMATION

        $Tag->profile(
            {
             name => VALUE,
            }
        )
    
     OR
    
        $Tag->profile($name, $ATTRHASH);

DESCRIPTION

2.57. query

CALL INFORMATION

        $Tag->query(
            {
             sql => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->query($sql, $ATTRHASH, $BODY);
                query ==> sql

DESCRIPTION

2.58. read_cookie

CALL INFORMATION

        $Tag->read_cookie(
            {
             name => VALUE,
            }
        )
    
     OR
    
        $Tag->read_cookie($name);

DESCRIPTION

2.59. record

CALL INFORMATION

        $Tag->record(
            {
            }
        )
    
     OR
    
        $Tag->record($ATTRHASH);
                code ==> key
                column ==> col
                field ==> col

DESCRIPTION

2.60. region

CALL INFORMATION

        $Tag->region(
            {
            },
            BODY
        )
    
     OR
    
        $Tag->region($ATTRHASH, $BODY);
                args ==> arg
                params ==> arg
                search ==> arg

DESCRIPTION

2.61. row

CALL INFORMATION

        $Tag->row(
            {
             width => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->row($width, $BODY);

DESCRIPTION

            width=nn        The column width, I<including the gutter>. Must be
                            supplied, there is no default. A shorthand method
                            is to just supply the number as the I<first> parameter,
                            as in [col 20].
        
            gutter=n        The number of spaces used to separate the column (on
                            the right-hand side) from the next. Default is 2.
        
            spacing=n       The line spacing used for wrapped text. Default is 1,
                            or single-spaced.
        
            wrap=(yes|no)   Determines whether text that is greater in length than
                            the column width will be wrapped to the next line. Default
                            is I<yes>.
        
            align=(L|R|I)   Determines whether text is aligned to the left (the default),
                            the right, or in a way that might display an HTML text
                            input field correctly.

2.62. salestax

CALL INFORMATION

        $Tag->salestax(
            {
             name => VALUE,
             noformat => VALUE,
            }
        )
    
     OR
    
        $Tag->salestax($name, $noformat);
                cart ==> name

DESCRIPTION

2.63. scratch

CALL INFORMATION

        $Tag->scratch(
            {
             name => VALUE,
            }
        )
    
     OR
    
        $Tag->scratch($name);

DESCRIPTION

2.64. scratchd

CALL INFORMATION

        $Tag->scratchd(
            {
             name => VALUE,
            }
        )
    
     OR
    
        $Tag->scratchd($name);

DESCRIPTION

2.65. search_region

CALL INFORMATION

        $Tag->search_region(
            {
             arg => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->search_region($arg, $ATTRHASH, $BODY);
                args ==> arg
                params ==> arg
                search ==> arg

DESCRIPTION

2.66. selected

CALL INFORMATION

        $Tag->selected(
            {
             name => VALUE,
             value => VALUE,
            }
        )
    
     OR
    
        $Tag->selected($name, $value, $ATTRHASH);

DESCRIPTION

        <SELECT NAME="color">
        <OPTION [selected color blue]> Blue
        <OPTION [selected color green]> Green
        <OPTION [selected color red]> Red
        </SELECT>
        <SELECT NAME="[modifier-name color]">
        <OPTION [selected [modifier-name color] blue]> Blue
        <OPTION [selected [modifier-name color] green]> Green
        <OPTION [selected [modifier-name color] red]> Red
        </SELECT>

2.67. set

CALL INFORMATION

        $Tag->set(
            {
             name => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->set($name, $BODY);

DESCRIPTION

      [set checkout]
      name=required
      address=required
      [/set]
      <INPUT TYPE=hidden NAME=mv_order_profile VALUE="checkout">
      [set substring_case]
      mv_substring_match=yes
      mv_case=yes
      [/set]
      <INPUT TYPE=hidden NAME=mv_profile VALUE="substring_case">

2.68. set_cookie

CALL INFORMATION

        $Tag->set_cookie(
            {
             name => VALUE,
             value => VALUE,
             expire => VALUE,
            }
        )
    
     OR
    
        $Tag->set_cookie($name, $value, $expire);

DESCRIPTION

2.69. seti

CALL INFORMATION

        $Tag->seti(
            {
             name => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->seti($name, $BODY);

DESCRIPTION

2.70. setlocale

CALL INFORMATION

        $Tag->setlocale(
            {
             locale => VALUE,
             currency => VALUE,
            }
        )
    
     OR
    
        $Tag->setlocale($locale, $currency, $ATTRHASH);

DESCRIPTION

2.71. shipping

CALL INFORMATION

        $Tag->shipping(
            {
             mode => VALUE,
            }
        )
    
     OR
    
        $Tag->shipping($mode, $ATTRHASH);
                carts ==> cart
                modes ==> mode
                name ==> mode
                tables ==> table

DESCRIPTION

2.72. shipping_desc

CALL INFORMATION

        $Tag->shipping_desc(
            {
             mode => VALUE,
            }
        )
    
     OR
    
        $Tag->shipping_desc($mode);

DESCRIPTION

2.73. soap

CALL INFORMATION

        $Tag->soap(
            {
             call => VALUE,
             uri => VALUE,
             proxy => VALUE,
            }
        )
    
     OR
    
        $Tag->soap($call, $uri, $proxy, $ATTRHASH);

DESCRIPTION

2.74. sql

CALL INFORMATION

        $Tag->sql(
            {
             type => VALUE,
             query => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->sql($type, $query, $ATTRHASH, $BODY);

DESCRIPTION

2.75. strip

CALL INFORMATION

        $Tag->strip(
            {
            },
            BODY
        )
    
     OR
    
        $Tag->strip($BODY);

DESCRIPTION

2.76. subtotal

CALL INFORMATION

        $Tag->subtotal(
            {
             name => VALUE,
             noformat => VALUE,
            }
        )
    
     OR
    
        $Tag->subtotal($name, $noformat);
                cart ==> name

DESCRIPTION

2.77. tag

CALL INFORMATION

        $Tag->tag(
            {
             op => VALUE,
             arg => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->tag($op, $arg, $ATTRHASH, $BODY);
                description ==> arg

DESCRIPTION

            [tag export products][/tag]
            [tag export products products/newproducts.txt][/tag]
            [tag export products products/newproducts.txt 5][/tag]
            [tag flag write]products sizes[/tag]
            [tag log logs/transactions.txt]
            [item_list][item-code]  [item-description]
            [/item_list][/tag]
           [tag mime My Plain Text]Your message here.[/tag]
          Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
          Content-ID: [sequential, lead as in mime boundary]
          Content-Description: My Plain Text
        
          Your message here.
            [tag show_tags][value whatever][/tag]
            [tag time]%A, %B %d, %Y[/tag]
            [tag touch products][/tag]

2.78. time

CALL INFORMATION

        $Tag->time(
            {
             locale => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->time($locale, $ATTRHASH, $BODY);

DESCRIPTION

        [time]%A, %B %d, %Y[/tag]
                [time]%c[/time]
                [time adjust="-3"]%c[/time]
         Mon 01 Jan 2001 11:29:03 AM EST
         Mon 01 Jan 2001 08:29:03 AM EST
                ## bash/ksh/sh
                TZ=PST7PDT; export TZ
                interchange -restart
        
                ## csh/tcsh
                setenv TZ PST7PDT
                interchange -restart
                [time]%c[/time]
                [time gmt=1]%c[/time]
                Mon 01 Jan 2001 11:33:26 AM EST
                Mon 01 Jan 2001 04:33:26 PM EST
                [time locale=en_US]%B %d, %Y[/time]
                [time locale=fr_FR]%B %d, %Y[/time]
                January 01, 2001
                janvier 01, 2001
                [time tz=GMT0]
                [time tz=CST6CDT]
                [time tz=PST8PDT]
                Mon 01 Jan 2001 04:43:02 PM GMT
                Mon 01 Jan 2001 10:43:02 AM CST
                Mon 01 Jan 2001 08:43:02 AM PST

2.79. timed_build

CALL INFORMATION

        $Tag->timed_build(
            {
             file => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->timed_build($file, $ATTRHASH, $BODY);

DESCRIPTION

            [timed-build]
                    Built at [time]%c[/time].
            [/timed-build]
                [timed-build if="[value timed]"]
                ITL tags....
                [/timed-build]
                [timed-build period="4 hours"]
                ITL tags....
                [/timed-build]
                [timed-build period="5 seconds"]
                ITL tags....
                [/timed-build]

2.80. tmp

CALL INFORMATION

        $Tag->tmp(
            {
             name => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->tmp($name, $BODY);

DESCRIPTION

2.81. total_cost

CALL INFORMATION

        $Tag->total_cost(
            {
             name => VALUE,
             noformat => VALUE,
            }
        )
    
     OR
    
        $Tag->total_cost($name, $noformat);
                cart ==> name

DESCRIPTION

2.82. tree

CALL INFORMATION

        $Tag->tree(
            {
             table => VALUE,
             master => VALUE,
             subordinate => VALUE,
             start => VALUE,
            },
            BODY
        )
    
     OR
    
        $Tag->tree($table, $master, $subordinate, $start, $ATTRHASH, $BODY);
                sub ==> subordinate

DESCRIPTION

        parent  child
        99      a
        a       b
        a       c
        a       d
        a       x
        x       y
        x       z
        99      m
        99      n
        99      o
        o       e
        o       f
        o       g
            a           mv_level=0, mv_increment=1, mv_children=4
                b       mv_level=1, mv_increment=1, mv_children=0
                c       mv_level=1, mv_increment=2, mv_children=0
                d       mv_level=1, mv_increment=3, mv_children=0
                x       mv_level=1, mv_increment=4, mv_children=2
                    y   mv_level=2, mv_increment=1, mv_children=0
                    z   mv_level=2, mv_increment=2, mv_children=0
            m           mv_level=0, mv_increment=1, mv_children=0
            n           mv_level=0, mv_increment=2, mv_children=0
            o           mv_level=0, mv_increment=3, mv_children=3
                e       mv_level=1, mv_increment=1, mv_children=0
                f       mv_level=1, mv_increment=2, mv_children=0
                g       mv_level=1, mv_increment=3, mv_children=0
                <table>
            [tree   start=99
                    parent=parent_fld
                    child=child_fld
                    autodetect=1
                                spacing=4
                    full=1]
                <tr>
                <td>
                [if-item-param mv_level]
                        [item-calc]
                                return '&nbsp' x [item-param mv_spacing];
                        [/item-calc]
                [/if-item-param]
                [item-param child_fld]
                </td>
                <td>
                        mv_level=[item-param mv_level],
                        mv_increment=[item-param mv_increment],
                        mv_children=[item-param mv_children]
                </td>
                </tr>
                [/tree]
                </table>
                1
                    A
                    B
                        1
                        2
                    C
                        1
                        2
                            a
                            b
                                1
                                2
                                    a
                                    b
                2

2.83. try

            $Tag->try(
                {
                 label => VALUE,
                },
                BODY
            )
        
         OR
        
            $Tag->try($label, $ATTRHASH, $BODY);

2.84. update

            $Tag->update(
                {
                 function => VALUE,
                }
            )
        
         OR
        
            $Tag->update($function, $ATTRHASH);

2.85. userdb

            $Tag->userdb(
                {
                 function => VALUE,
                }
            )
        
         OR
        
            $Tag->userdb($function, $ATTRHASH);
                    name ==> nickname
                    table ==> db
         [userdb
                function=function_name
                username="username"*
                password="password"*
                verify="password"*
                oldpass="old password"*
                shipping="fields for shipping save"
                billing="fields for billing save"
                preferences="fields for preferences save"
                force_lower=1
                param1=value*
                param2=value*
                ...
                ]
            [set Login]
            mv_todo=return
            mv_nextpage=welcome
            [userdb function=login]
            [/set]
        
            <FORM ACTION="[process-target]" METHOD=POST>
            <INPUT TYPE=hidden NAME=mv_click VALUE=Login>
            Username <INPUT NAME=mv_username SIZE=10>
            Password <INPUT NAME=mv_password SIZE=10>
            </FORM>
            database     Sets user database table (userdb)
            show         Show the return value of certain functions
                         or the error message, if any (0)
            force_lower  Force possibly upper-case database fields
                         to lower case session variable names (0)
            billing      Set the billing fields (see Accounts)
            shipping     Set the shipping fields (see Address Book)
            preferences  Set the preferences fields (see Preferences)
            bill_field   Set field name for accounts (accounts)
            addr_field   Set field name for address book (address_book)
            pref_field   Set field name for preferences (preferences)
            cart_field   Set field name for cart storage (carts)
            pass_field   Set field name for password (password)
            time_field   Set field for storing last login time (time)
            expire_field Set field for expiration date (expire_date)
            acl          Set field for simple access control storage (acl)
            file_acl     Set field for file access control storage (file_acl)
            db_acl       Set field for database access control storage (db_acl)

2.86. value

            $Tag->value(
                {
                 name => VALUE,
                }
            )
        
         OR
        
            $Tag->value($name, $ATTRHASH);
           <PARAM MV="value name">
           <INPUT TYPE="text" NAME="name" VALUE="[value name]">

2.87. value_extended

            $Tag->value_extended(
                {
                 name => VALUE,
                }
            )
        
         OR
        
            $Tag->value_extended($name, $ATTRHASH);
           [value-extended
                    name=formfield
                    outfile=filename*
                    ascii=1*
                    yes="Yes"*
                    no="No"*
                    joiner="char|string"*
                    test="isfile|length|defined"*
                    index="N|N..N|*"
                    file_contents=1*
                    elements=1*]

3. User-defined Tags

       UserTag  tagname  property  value
        UserTag product_name Alias     data products title
        UserTag company_name Routine   sub { "Your company name" }
        UserTag caps   Routine   sub { return "\U@_" }
        UserTag caps   HasEndTag
        UserTag quick_table HasEndTag
        UserTag quick_table Interpolate
        UserTag quick_table Order   border
        UserTag quick_table Routine <<EOF
        sub {
            my ($border,$input) = @_;
            $border = " BORDER=$border" if $border;
            my $out = "<TABLE ALIGN=LEFT$border>";
            my @rows = split /\n+/, $input;
            my ($left, $right);
            for(@rows) {
                $out .= '<TR><TD ALIGN=RIGHT VALIGN=TOP>';
                ($left, $right) = split /\s*:\s*/, $_, 2;
                $out .= '<B>' unless $left =~ /</;
                $out .= $left;
                $out .= '</B>' unless $left =~ /</;
                $out .= '</TD><TD VALIGN=TOP>';
                $out .= $right;
                $out .= '</TD></TR>';
                $out .= "\n";
            }
            $out .= '</TABLE>';
        }
        EOF
        [quick-table border=2]
        Name: [value name]
        City: [value city][if value state], [value state][/if] [value country]
        [/quick_table]
            UserTag tagname Alias    tag to insert
            UserTag tagname attrAlias   alias attr
            UserTag value attrAlias   identifier name
            UserTag tagname CanNest
            UserTag tagname HasEndTag
            UserTag tagname Implicit attribute value
            UserTag include Implicit file file=/long/path/to/file
            UserTag tagname InsertHTML   htmltag  mvtag|mvtag2|mvtagN
           <INPUT TYPE=checkbox
                MV="checked mvshipmode upsg" NAME=mv_shipmode> UPS Ground shipping
           <INPUT TYPE=checkbox CHECKED NAME=mv_shipmode> UPS Ground shipping
            UserTag tagname InsideHTML   htmltag  mvtag|mvtag2|mvtagN
           <SELECT MV="loop upsg upsb upsr" NAME=mv_shipmode>
           <OPTION VALUE="[loop-code]"> [shipping-desc [loop-code]]
           </SELECT>
           <SELECT NAME=mv_shipmode>
           [loop upsg upsb upsr]
           <OPTION VALUE="[loop-code]"> [shipping-desc [loop-code]]
           [/loop]
           </SELECT>
            UserTag tagname Interpolate
            UserTag tagname InvalidateCache
            UserTag tagname Order param1 param2
          UserTag tagname ReplaceAttr  htmltag attr
          UserTag  area  ReplaceAttr  a  href
            <A MV="area pagename" HREF="a_test_page.html">
            <A HREF="http://yourserver/cgi/simple/pagename?X8sl2lly;;44">
          UserTag company_name Routine sub { my $l = shift; return "$l: XYZ Company" }
          UserTag company_name HasEndTag
          UserTag company_name ReplaceHTML  b    company_name
            <B MV="company-name"> Company </B>  --->>  Company: XYZ Company
            <I MV="company-name"> Company </I> --->>  <I>Company: XYZ Company</I>
            UserTag tagname Routine  sub { "your perl code here!" }
            UserTag tagname Routine <<EOF
            sub {
                my ($param1, $param2, $text) = @_;
                return "Parameter 1 is $param1, Parameter 2 is $param2";
            }
            EOF