a
Parameters: href arg
Positional parameters in same order.
The attribute hash reference is passed to the subroutine after the parameters as the last argument. This may mean that there are parameters not shown here.
Must pass named parameter interpolate=1 to cause interpolation.
Invalidates cache: no
Called Routine:
ASP/perl tag calls:
$Tag->page( { href => VALUE, arg => VALUE, } ) OR $Tag->page($href, $arg, $ATTRHASH);
Attribute aliases
base ==> arg
The additional argument will be passed to MiniVend and placed in the {arg}
session parameter. This allows programming of a conditional page display
based on where the link came from. The argument is then available with the
tag [data session arg], or the embedded Perl session variable
$Session->{arg}. Spaces and some other characters will be escaped with
the %NN
HTTP-style notation and unescaped when the argument is
read back into the session.
A bit of magic occurs if MiniVend has built a static plain HTML page for the target page. Instead of generating a normal MiniVend-parsed page reference, a static page reference will be inserted if the user has accepted and sent back a cookie with the session ID.
The optional form
argument allows you to encode a form in the link.
[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>
The two form values mv_session_id and mv_arg are automatically added when appropriate. (mv_arg is the arg
parameter for the tag.)
If the parameter href
is not supplied, process is used, causing normal MiniVend form processing. If the href
points to an http:// link no MiniVend
URL processing will be done, but the mv_session_id
This would generate a form that ordered item number 99-102 on a separate
line (mv_separate_items
being set), with size L
, in quantity 2. Since the page is not set, you will go to the default
shopping cart page -- equally you could set mv_orderpage=yourpage
to go to yourpage
.
All normal MiniVend form caveats apply -- you must have an action, you must supply a page if you don't want to go to the default, etc.
You can theoretically submit any form with this, though none of the included values can have newlines or trailing whitespace. If you want to do something like that you will have to write a UserTag.
MiniVend allows you to pass a search in a
URL. Just specify the search with the special page
reference scan
. Here is an example:
[page scan se=Impressionists sf=category] Impressionist Paintings [/page]
Here is the same thing from a home page (assuming /cgi-bin/vlink is the CGI path for MiniVend's vlink):
<A HREF="/cgi-bin/vlink/scan/se=Impressionists/sf=category"> Impressionist Paintings </A>
Sometimes, you will find that you need to pass characters that will not be interpreted positionally. In that case, you should quote the arguments:
[page href=scan arg=| se="Something with spaces" |]
The two-letter abbreviations are mapped with these letters:
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 td mv_table_cell tf mv_sort_field th mv_table_header to mv_sort_option tr mv_table_row un mv_unique va mv_value
They can be treated just the same as form variables on the page, except that they can't contain spaces, '/' in a file name, or quote marks. These characters can be used in
URL hex encoding, i.e. %20
is a space, %2F
is a
/
, etc. -- &sp;
or  
will not be recognized. If you use one of the methods below to escape these
``unsafe'' characters, you won't have to worry about this.
You may specify a one-click search in three different ways. The first is as used in previous versions, with the scan
URL being specified completely as the page name. The second two use the ``argument'' parameter to the
[page ...]
or
[area ...]
tags to specify the search (an argument to a scan is never valid anyway).
[page scan se=Surreal/se=Gogh/os=yes/su=yes/sf=artist/sf=category] Van Gogh -- compare to surrealists [/page]
In this method of specification, to replace a / (slash) in a file name (for the sp, bd, or fi parameter) you must use the shorthand of ::, i.e. sp=results::standard. (This may not work for some browsers, so you should probably either put the page in the main pages directory or define the page in a search profile.)
[page scan se="Van Gogh"&sp=lists/surreal&os=yes&su=yes&sf=artist&sf=category] Van Gogh -- compare to surrealists [/page]
Any ``unsafe'' characters will be escaped.
[page scan se="Van Gogh" sp=lists/surreal os=yes su=yes sf=artist sf=category ] Van Gogh -- compare to surrealists [/page]
Any ``unsafe'' characters will be escaped. You may not search for trailing spaces in this method; it is allowed in the other notations.
New syntax and old syntax handle the tags the same, though if by some odd
chance you wanted to be able to search for a ]
(right square bracket) you would need to use new syntax.
The optional arg is used just as in the page tag.