Creating a THREE-Tier Website using WebMerge

 

The WebMerge FAQ explains How do I create three-level hierarchies?:

 

The basic rule is that a given WebMerge settings file will be well suited for one pair of hierarchical elements, such as index pages and detail pages. If you need multiple hierarchies then you would create a separate settings file for each.

The trick is to make sure that your pages at each level of the hierarchy are generated using the same naming method. For example, if you want a three-level set of pages, your first settings file creates a list of categories as the index page, linking to a set of empty detail pages. In the second settings file, your index pages will overwrite the empty pages from the first settings file, with detail pages providing the actual product info.

Keep in mind that you can queue up multiple settings files to run in a batch (see the Generation tab), so once you're set up you can generate all your pages with one click.

 

That really says it all. However, it sometimes takes a while to fully grasp this powerful feature. It took me a couple of days.  So, here is how I would go about creating a THREE-TIER Website using the FTC datafeed as an example.

 

A three-tier website is useful when you have a relatively small number of products to display, e.g., several dozen to several hundred. It is also used when you have CATEGORY information in the datafeed, but no SUBCATEGORY. If, on the other hand your datafeed includes thousands of items (like the FTC feed) and both SUBCATEGORY and CATEGORY fields, then a FOUR TIER Website may be a better match for your needs.

 

In a three-tier Website you usually want all the CATEGORIES of the datafeed listed on the primary index page. Clicking on a Category link, e.g., “Curious George,” should take you to a Category Index page called “Curious-George.html” that displays all the Curious George products. Clicking on the link to a specific product, e.g., “Curious George Zoo Wagons” then takes you to the detail page called NEWCURGEORZO1.html where that product is described and with links for purchasing the item from the FTC website.

 

How the information pulled from the datafeed and appears on those three-tier pages is controlled by your three template files – 0-INDEX-TEMPLATE.html, 0-CATEGORY-TEMPLATE.html, and 0-DETAIL-PRODUCT-TEMPLATE.html. How those pages are generated is controlled by the TWO WebMerge Settings files.

 

The key to creating a multi-tiered Website is to remember that WebMerge creates TWO (and only two) levels with each WM settings file, i.e., one level controlled by the Index Pages Tab and one level controlled by the Detail Pages Tab. In order to create three levels of linking files you must therefore run TWO DIFFERENT WM settings files. The first setting file will to create Index.html and Widgets.html and second to create Widgets.html (again) and Round-Widgets.html.

 

First, it is important to recognize that creating a THREE-TIER Website using WebMerge requires TWO WebMerge setting files. Each setting file creates one pair of hierarchical elements, i.e. two levels of a website. There also must be a linking variable between the two settings files. This means that two WM settings files can create a three level Website. Three WM settings files can create a four level Website. And so on. Here are the specific settings for the two WebMerge settings files used in this tutorial.  Actual screen shots are available here.

 

WebMerge settings files to create a Three-Tier Website

WebMerge Tabbed Features

WM Setting File One

WM Setting File Two

File Name in this tutorial

FTC-3Tiers 1.4ww

FTC-3Tiers 2.4ww

Sources: Exported File

ftcdatafeed-20records.txt

ftcdatafeed-20records.txt

Sources: Presets

MS Excel Text – Tab Delimited

MS Excel Text – Tab Delimited

Index Pages: Index Template

0-INDEX-TEMPLATE.html

0-SUBCATEGORY-TEMPLATE.html

Index Pages: Generated File Names

Make only one index file

Name based on contents of field CATEGORY

Detail Pages: Index Template

0-DETAIL-PRODUCT-TEMPLATE.html

0-DETAIL-PRODUCT-TEMPLATE.html

Detail Pages: Generated File Names

 

Name based on contents of field CATEGORY

Name based on contents of field SKU

Generation: Run other WebMerge Files after this one completes

FTC-3Tiers 2.4ww

NA

 

 

The first WM settings file is used to create Index.html and the placeholder names for the Category level files. Create a settings file (FTC-3Tiers 1.4ww) using the above information. If you do a test run of this file (without running the second setting file) you should end up with ONE index page and a file for each Category. NOTE: The contents of “Category files” will include be the detailed product information for the item in your datafeed. For example, while there are three Curious George products in the FTC-20 sample feed, it is the one that appears first (Curious George Zoo Wagons) that appears at this point in the process. This is temporary.

 

The second WM settings file creates Category levels files (again) and the detail product files. Note that the Index Pages: Generated File Names is set to Name based on contents of field CATEGORY.  The key to creating tiered indexes in linking the two settings files with a common field, e.g., in this case “CATEGORY.” On the other hand, the Detail Pages: Generated File Names is set to Name based on contents of field SKU. Since each product has a unique SKU, this ensures that each detailed product page will be unique. Run a test and you should now end up with index.html unchanged from the previous run. However, when you click on the “Curious George” link you should now see a Category page that display three products, including Curious George Zoo Wagons.

 

It may seem confusing why the above example uses the “0-SUBCATEGORY-TEMPLATE.html rather than the 0-CATEGORY-TEMPLATE.html. This will become clearer once you see the setup of the FOUR TIER Website.

 

Finally, it is important to remember that to create a complete set of three-tiered files you must always run TWO WM settings files consecutively. You can do this manually, or use the option on the Generation Tab to automatically run WM setting file “two” after “one” is completed.

 

 

NEXT: Three-tier Screen Shots

 

BACK TO THE HOME PAGE