Welcome to web merge! This is a simple yet very powerful command.

What does it do?

It allows you to build huge numbers of pages which contain differing content, while having idential formatting. It's something like templates, only this command generates the pages for you. This way you could keep track of hundreds of catalog elements by viewing them in an html table, and when you wanted to create a catalog, you just build a simple html template and "merge" them.

This is very much like "mail merge" where you have a list of addresses and a form letter template and you want to print out many letters like :

 

Dear Joe,

Thanks for the red shoes.

 

and then somewhere else have:

 

Dear Mary,

Thanks for the new car.

 

How does it work?

You need to create two files - one a page with a simple table in it, and another page with the html formatting you want, with some special tags included.

Here's an example table:

myname mydate mylocation
joe
09/25/69
paris
phil
09/25/80
london
mike
09/25/90
rome
bill
09/25/66
england
alice
09/25/63
france
john
04/25/69
italy
major
09/22/69
usa
will
09/13/69
mars
penny
09/25/77
jupiter

The first item in each column is special - it defines the name of that data catagory, as well as the tagname for the placeholder tags you put in the prototype file. So for instance here you have three elements which will get inserted into the merged document:

myname
mydate
mylocation

In the prototype file, you put any HTML you want, but then in the places where you want say - the name - to occur, you insert a tag with that corresponding name:

Hi, <myname><b>placeholder</b></myname>!

that will get replaced in each created file with the name, for example:

Hi, <myname>joe</myname>!

you can optionally have the placeholder tags not show up in the results - which you would then just see:

Hi, joe!

Isnt this great!

Now you have separation of content from formatting!

You can even do neato things like Include stuff in the TITLE tag:

<title><myname>placeholder</myname> 's page</title>

in the template becomes:

<title>joe's page</title>

In the output!

 

You can also specify the "prefix" for the files generated and the starting number:

prefix: joe and starting: 44 will build pages like:

joe44.html, joe45.html, joe46.html etc etc.

You can include ANY HTML in cells of the data table, so you could put complicated layers,etc.etc. into each table and they will get copied into the merged document!

Whee!

BTW - be sure to look at the demos I included with this file on my site.

Let me know if this is a useful tool.

Andew Wooldridge - andreww@netscape.com