overview applications limitations structure diagram files details
This is an example that illustrates the usage of Redbourne macro tags to create a menu structure for your website. Commonly a web page will have a menu structure on the left-hand side. This menu will then be used to navigate throughout the website. Redbourne have provided a number of macro tags that support the quick deployment of such a menu. This support is very flexible and allows different menus/sub-menus to be dynamically managed as required.
The menu item attributes can also be altered in a very flexible manner and this is demonstrated well in the sample application. As expected, the hypertext links associated with each menu item will 'jump' to web pages or bookmarks. In addition, Redbourne have created other macro tags which divide a web page into sections. These sections can then be referenced by hypertext links which can then allow different parts of a web page to be shown separately as required. Finally, the example application will show that with a small change, the web page can be switched to be 'printer-friendly' by only displaying the body content.
This example application is applicable to all sites requiring a quickly deployable and flexible menu.
There are no specific limitations of note.
| Application |
|---|
|
|

|
Application |
|
|---|---|
| 1. rbpagemenu.inc | This include file holds redbourne information used by ALL the example web pages to support the redbourne menu item macro tags. |
| 2. index.rhtm | This page is the start of the application. It displays a simple menu structure and provides access to all other examples. |
| 3. menuSampleTop.inc | This include file holds top menu information (HOME) used by all example web pages. |
| 4. menuSampleLevel2.inc | This include file holds sub-menu (level two) information used by all but one of the example web pages. |
| 5. menuSampleLevel3Basic.inc | This include file holds sub-menu (level three) information used by the basic menu structure example below. |
| 6. menuSampleBasic1.rhtm | This file provides a basic 3-tier menu structure by use of the three include files above. |
| 7. menuSampleAtt1.rhtm | This web page has the same text as the start page except that layout attributes have been added. |
| 8. menuSampleSections.rhtm | This webpage displays how menu items can support sections within web page content. |
| 9. menuSampleLevel3Sections.inc | This include file supports the functionality displayed by the sections web page. This file is similar in ilk to the menuSampleBasic.inc file except that the hypertext links point to sections in a single web page. |
| 10. menuSampleSectionsb.rhtm | This webpage displays how menu items can be auto-generated from the page by use of sections. |
It is simple to setup a menu structure using Redbourne's macro tags. All the functionality needed to process the information you provide is contained in an include file named 'rbpagemenu.inc'. What goes on inside this file need not concern you - all that is required is knowledge of the interface syntax. The examples break up the menu structure into three include files, one for each layer. These three include files could have actually been combined into one file. The attributes of menu items could also have been put into the include files. This is the entry for the top level menu item named home (menuSampleTop.inc)
<rbm:menuitem name="Home" href="/example5/menuSample1.rhtm " key="top" />
<rbm:menuitem parent = "top">
<rbm:menuitem name="Basic menu" href="/example5/menuSampleBasic1.rhtm " key="basic"/>
</rbm:menuitem>
item1
Here the block is created with a unique name, provided with attributes and a menu text, and finally passed to the menuitem call in-place of the name value. The same process is required when setting the banner and menu attributes. A block is created as above, but this time the block id is passed to the body tag of the web page as follows: (menuSampleAtt1.rhtm)

To create a web page having the content split-up into sections, the body text sections need to be encapsulated by Redbourne 'Section' macro tags. Any code not included between section tags will always be displayed. Once the sections have been created, then these areas will need to be wrapped by Redbourne 'Chapter' tags. These chapter tags are used to implictly manage the situation if a section called does not exist. In this case, the first section in the chapter will be displayed. The syntax for section is shown below:
Text which is always shown.
Section Number One
Section Number Two
Text which is always shown.
Section Number One
Section Number Two