2.3.2.2 Auto-Numbering Properties with Subproperties

The example in Properties with Auto Numbering shows how you can use auto numbering to duplicate a text property. You can also use auto numbering to duplicate a property with subproperties. Then, the subproperties are also duplicated. In the demonstration data, an auto-numbering subproperty has been used to create Web page number GLOBAL MENU, which appears in the top frame of this screen picture:

This page contains, among other subproperties, a subproperty with the text 'English' or 'German' in the top left corner. In Navision, open the Web Pages window. Find GLOBAL MENU in the Page No. field. This page has several subproperties, including Language. This is the subproperty that contains the two subproperties English and German, shown on the Web page. The following two diagrams illustrate the structure of this Web page, and the underlying Web template.

Web template with auto-numbering subproperties

The first diagram illustrates the Web template. The template contains an auto-numbering property which represents an unknown number of languages.

In the first property collection, the menu items are represented by a single property. The second property collection contains an auto-numbering property (#) that represents one language. The third property collection defines the properties that make up a language. (Property type: T = Text, S = Subproperties, L = Link, P = Picture):

 

Global Menu Template

Global Menu

 

 

Logo

T

 

 

 

 

 

 

 

Languages

S

Languages

 

 

 

 

 

 

#

Language

S

Language

 

 

 

 

 

Language code

T

 

 

Text

T

Compare the diagram with the T-GLOBALMENU Web template in the demonstration company. (The diagram is simplified, so it does not contain as many properties as the template in the demonstration data)

Web page with auto-numbering subproperties

The second diagram illustrates a Web page created from the Web template shown above. When a Web page is created from the template, the second property collection contains one line for each of the list entries, and the third property collection is duplicated for each of the list entries.

 

 

Global Menu Page

 

Global Menu

 

 

Logo

T

 

 

 

 

German

Languages

S

Languages

 

Language code

T

 

 

 

10000

German

S

Text

T

 

 

 

20000

English

S

 

 

 

 

 

 

English

 

 

 

 

Language code

T

 

 

 

 

Text

T

Compare the Web page diagram with the GLOBAL MENU Web page in the demonstration company.