CGI and Perl

Setting Up Your Catalog Pages

Catalog pages are simply HTML files with some additional markup. The additional markup consists of MiniVend tags that are enclosed in square brackets [] rather than HTML's angle brackets <>. The page flow under normal circumstances consists of catalog.html to order.html to confirmation.html. The catalog page can be as simple or as complex as you like. I suggest that you start out simple and then add features as you become more familiar with the capabilities. The catalog page for the example in this chapter will remain simple. Here, you provide a search page and a browse-by-category page. The HTML with additional MiniVend markup is shown in Listing 13.1, and the resulting page is shown in Figure 13.1.

Listing 13.1. The main catalog page.

<HTML><HEAD>
 <TITLE>The Web Shopping Network Home Page</TITLE>
 </HEAD>
 <BODY>
 <H1>Welcome to the Web Shopping Network</H1>
 <P>
 Our store carries the latest products in home electronics. Please feel
 free to [page browse] browse [/page] through our collection or
 [page descsrch] search [/page] for a particular item.
 <P>
 As you see an item you would like to purchase, simply add
 it to your virtual shopping cart and continue through our catalog.
 When you're ready to place your order you can go to our
 [page order] order [/page] form to submit the order.
 <P>
 </BODY></HTML>

You're going to use the [page] tag quite a bit. This tag is similar to the <A HREF=> HTML tag. You use it to navigate within your MiniVend site.


Figure 13.1. The main catalog page as it will appear in your browser.

by BrainBellupdated
Advertisement: