Web-Procreate.Com - Datafeed and WebMerge Section


Index templates

How Does the Index Template Work with WebMerge?

Index templates are used by WebMerge to generate all higher level hierarchy pages.  Index templates are pages that have links to detail pages, or other (lower level) index pages.  See figure 7. below.

Figure 1 - Examples of Index Pages in the Hierarchy

Fig. 7- Examples of Index Pages in the Hierarchy

WebMerge can generate a set of pages using a built-in default Index template, however to be effective, a custom template should be designed and used.

Similar to the Detail template, time can be saved by utilizing a blank page from your web site that already has all of the formatting included. For example, your logo, navigation, banner/text ads, and anything else that is particular to your web site will have already been created by you. The only requirement is to insert the WebMerge Tags in the right places to complete the Index template.

WM-Tags

WebMerge Tags (WM-Tags) used with standard HTML or PHP are used in the Detail template and Index templates in order for WebMerge to write information into the pages it builds. When WebMerge builds index pages, it reads the Index template you have created, and looks specifically for WM-Tags inserted into the template's HTML code.

Main Category or Highest Category Index Pages

Once WebMerge finds the fields in the data feed that match the WM-Tags in the Index template, WebMerge acts depending on how you have configured the items on the index pages tab in WebMerge. For example, WebMerge may be configured to place a new link on the index page only after the "Main Category" in the feed changes from "Cleaners" to "Boxes" to "Brushes" and so on, See Figure 9, below. WebMerge examines every record one-at-a-time, accordingly it my go through many records before it adds the next link on the index page. See the "Main Category (Index) Page" in figure 9, below.

Sub-Category or Lowest Category Index Pages

The lowest tier index page will contain links to individual detail pages. In this case, a link will be placed on the index page for every record listed in the last (or lowest by directory) category in the data feed file. See the "Sub-Category (Index) Page" in figure 8, below.

As an example, this works well for a three-tier web-site that might have ten or twenty Main Categories ("Cleaners," "Boxes," "Brushes" etc.) found on the Main Category index page. These link to the index pages called Sub-Category index pages and contain sub-category links (for example "FRS-300," FRS-301," "FRS-302" etc.), these final links point to individual detail pages. See Figure 9 below.

Figure 2 Link relationships in Index Pages

Fig. 8 - Link relationships in Index Pages

 


Laying Out Your Index template

Basic or Bottom Level Index Page

As mentioned above, once the basic Index template with your web site's formatting has been completed, you need to add the appropriate WM-Tags. The most important tags for an Index template are the [WM-Record] and [/WM-Record] tags. Each time WebMerge looks at a record in the data feed file, it matches the data you specified between these Record tags. An example of this code follows:

NOTE:The code above (Between [WM-Record] tags) is actually one single line of code, without (carriage returns).

WM-Tags Placed Between Record Tags

The above code includes Record tags, with the other WM-Tags placed between them – identical to the bottom level index page. Please remember to place the IndexLabel tags just like the example above, preferably without any carriage returns.

In the example above, file names for the product (Detail) pages will be based on the field name Product_ID. Link text (displayed in the browser), are based on the Field name called Product_Name. Lastly, the "title" (HTML tag) has also been included, and is based on the Field name Description.

These WM-Tags are the same as used in the detail template, except that we will be adding more options to the tags placed in the template. For example, the "noindex" option is mandatory for all WM-Tags (except "Record" and "Index Label" tags) in all index pages. Eliminating these tags, usually results in odd links or code being displayed in the browser. If these are present, re-check the "noindex" option in your tags.

The code between the Record tags is a standard HTML < HREF > tag, similar to what is used in the detail template. The Title tag is optional on your part, but including it is good practice.

TIP: The title HTML tag can be read by text-readers (used by the visually impaired). If you put the right information in it, everyone can benefit. For example, the product description can be included in the title tag. This will allow a visitor to your bottom level index page to hover their mouse over the product link, and see the product description. Also a benefit if several of your product descriptions, loaded with keywords were included in every index page.

Top Level Index Pages

The topmost level index page is the place where many visitors can start drilling down into product categories, looking for what they need. This will also make a great landing page for a particular merchant. Adding a little flair and ad-copy to this page is also a good idea.

The top-level index page tags are a little different than those for other index pages. The objective is not to build a page that will lead visitors to individual product pages, but other index pages, (specifically, Sub-Categories). Importantly, only one top-level index page will be created.

WM-Record Tags are still required (as for any index page), however an additional tag needs to be added - the "IndexLabel" tag.

The IndexLabel Tag

Using the [WM-IndexLabel] tag results in only a portion of an index page being written, and only when the value in the specified field changes between records. In the example below, "All_Products" is used as the value for the IndexLabel tag, and "All_Products" is the Field name for the Main Category

Using Figure 9 (above), All_Products will produce links on the index page such as Cleaners, Boxes, Brushes and so on. For example, on the completed index page there will be a link to "Cleaners.html." Below is the code used in the tags for this Top Level index page:

NOTE: The code above (Between [WM-Record] and [WM-IndexLabel] tags) is actually one single line of code, without (carriage returns).

The above code includes Record tags, with the other WM-Tags placed between them – identical to the bottom level index page. Please remember to place the IndexLabel tags just like the example above, preferably without any carriage returns.

The Field names chosen for the WM-Tags in the example above, link to a lower-level document (Sub-Category index page). Please notice these Field names do not link to a product detail page, but link to a page based on the Sub-Category, in this case "Cleaners." Because the Top-Level index page is being created, WebMerge needs to be set to only build one page. On the index page Tab, click the radio button for "Make Only One index page," and type a name in the box that you want to use.

TIP: You may want to name it the same as the merchant or similar ("BestMerchant.htm" for example).

Remember, the "noindex" option is mandatory for all WM-Tags (except "Record" and "Index Label" tags) in all index pages. Leaving out the "noindex" tag, usually results in odd links and code being displayed in the browser window after loading the completed index page. If these are present, re-check the WM-Tags in the Index template.

The code between the Record tags is a standard HTML <HREF> tag; similar to what is used in the detail template. The Title tag is optional on your part, but including it is good practice. The title tag can be read by text-readers (used by the visually impaired).


Other places for WM-Tags in the Index template

WM-Tags used to build links from the index pages, are not the only use of WM-Tags in the template. WM-Tags can also be used in the header, for example to add the name of the category between the <title> </title> HTML tags. Remember, there are lots of creative ways in which one can use the information in the data feed. Another example might be where the category name is inserted at the top of the HTML code displayed in the user's web browser between <h1> tags. This is another way to help one's search engine rankings. Once the Detail and Index templates are designed, and saved, you can then begin saving the settings for WebMerge

TIP: Please see the Files and Categories Requirements Matrix for files and categories required for multi-Tier design...

 

Revision 4 (2014)


NEXT SECTION - Setting Up WebMerge