;;; header.mhtml: -*- Meta-HTML -*- 

;;;  Copyright (c) 1996 Universal Access Inc.
;;;  Author: Henry Minsky (hqm@ua.com) Sun Sep 15 11:12:41 1996.

<include ../header.mhtml>
<include ../../navbar.mhtml>
<set-var mhtml::cacheable = true>

<center>
  <p>
  <font size="+1"><b><i>
  <Meta-HTML>: Do It Yourself Shopping Cart
  </i></b></font>
</center>

<use-pagelist acme>

<h2><get-var title></h2>

<defun source-view file use-stem?>
  <set-var stem=<match <get-var file> "[^/]+$" action=extract>>
  <a href="<concat 
	     <get-var mhtml::url-to-dir>/view-file.mhtml
	     <get-var mhtml::relative-prefix>/<get-var file>>"
     target="source">
  <if <not <get-var use-stem?>> "View source of ">
  <get-var stem></a>
</defun>

<defun acme-page num>
  <a href="<get-var num>/acme.mhtml" target="acme">
    The Acme Page in action
  </a>
</defun>

<defmacro section-pages which>
  <set-var pages[]="%body">
  <set-var i=0>
  <ul>
    <li> <acme-page <get-var which>>
    <if "%1"
	<prog <li> <a href="<get-var which>/%1" target="acme">%2</a>>>
    <if "%3"
	<prog <li> <a href="<get-var which>/%3" target="acme">%4</a>>>
    <if "%5"
	<prog <li> <a href="<get-var which>/%5" target="acme">%6</a>>>
    <if "%7"
	<prog <li> <a href="<get-var which>/%7" target="acme">%8</a>>>
    <li>
    <ul>
      <li> <source-view <get-var which>/acme.mhtml>
      <while <get-var pages[i]>>
	<li> <source-view <get-var which>/<get-var pages[i]>>
	<increment i>
      </while>
    </ul>
  </ul>
</defmacro>
