2.2 Web Templates

This section explains what a template is. It describes the relationship between a Web template in Navision, an Active Server Page (ASP) and the template's properties. Finally, it summarizes where the different types of information that make up the Web site are stored.

A template in Commerce Portal is similar to a template in a word processing application. It is a document that contains formatting and, sometimes, generic text or other content. However, most of the content remains to be filled in on the individual Web page. You can use one Web template as a model for creating many Web pages.

The following diagram shows how Web templates make up a Web site. A Web site can contain any number of Web templates:

When you design a template, you decide what properties (attributes or characteristics) you would like the pages based on that template to have. You decide the layout of each page and what types of information will be included. You can then create many pages that are based on the same template but contain different information.

The screen picture below is taken from the demonstration Web portal. It consists of four Web pages; each of the colored rectangles is a separate frame, which displays a Web page:

 

The largest frame in the picture contains Web page number G-CHAIR, which is based on the PRODUCTCARD template. The list of storage units (page number WHITEBOARD) in the following picture is based on the same template:

Because they are based on the same template, both pages have the same format and characteristics. That is, each page has a heading and an item description.

The pages differ, however, in that they describe different items. Both pages have the same properties, but some of the properties have different values.

We can list some of the properties of the two pages:

Some properties have the same value on both pages, such as the fonts and sizes. These properties are fixed.

Other properties are variable. That is, the content or value of the property varies from one Web page to another. The value of the following properties differs on the two pages:

All of the properties - variable and fixed - are defined on an Active Server Page (ASP page) and a cascading style sheet. Out of the complete list of properties, you can choose which ones you want to edit in Navision .

Not all variable properties need to be accessible for editing. In many cases, the ASP page can automatically retrieve the value of the property directly from a table in Navision. For example, on the PRODUCTCARD template in the example above, the item name and number in each caption comes directly from the Item table. Only those properties which will be edited by the user need to be on the Web template.

In other words, there are two types of variable properties:

The properties you choose to edit in Navision will appear on the Web template. The fixed properties of a template can only be edited directly on the ASP page or the cascading style sheet.

Related Topics

Web Site Setup

Template Properties

Importing Template Properties

Multiple Web Sites

ASP Pages

Information Storage

Finding the Page Number of a Page on the Internet

Create Web Template (Batch Job)