Index  Up  <<  >>  


[page ...]

named: [page href=``dir/page'' arg=``argument''* secure=1* form=``form string''*]

positional: [page dir/page arg*] (only two positional parameters)

HTML example: <A MV=``page'' MV.HREF=``dir/page'' MV.ARG=``arg'' HREF=``dir/page.html''>

Insert a hyperlink to the specified catalog page pg. For example, [page shirts] will expand into < a href=``http://machine.company.com/cgi-bin/vlink/shirts?WehUkATn;;1''>. The catalog page displayed will come from ``shirts.html'' in the pages directory.

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 $Safe{'session'}->{arg}. If you set the catalog configuration option NewEscape, which is the default, then 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.

You must have TolerateGet set (which is the default) and 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.


Index  Up  <<  >>