Introducing XWeb

Changing the navigation

Some of the most important parameters change the way the navigation is presented. The first option is the position of the main navigation, i.e. the elements for the sections. By changing this the whole navigation moves since the secondary navigation (the elements for the entries) will be placed either beneath or to the inside of the main navigation. There are two possible positions for the navigation: "left" and "top", which are given by the parameter nav.main.pos. The default is to the left.

Two options exist for the placement of the secondary navigation which is placed relative to the main navigation: it can be either below the main navigation or put in between the sections. For achieving this the parameter nav.sec.pos can be set to either "below" or "nested", it defaults to the nested version, this manual was created by putting the secondary navigation below the main navigation on the left.

If you use the nested navigation you can also decide if only the entries in the current section are visible (i.e. only the current section is opened in the navigation) or if all entries should be visible all the time. The first version is quite useful if you have a large number of entries, the latter is usually less irritating. Set the parameter nav.sec.visible to either "current" or "all", it defaults to "current". If the secondary navigation is not nested, this parameter is ignored.

Whenever not all entries are visible the sections themself will be used as links to the first entry in them, if you click on the section name the browser will jump to the page of the first entry (just click on a section to the left to see this effect). This entry will be otherwised handled like every other entry in the default setting (the click you used to get into this section produced the same result as clicking on "Introduction" now), but you can change this behaviour to hide the first entry in a section, thus making it addressable only through the section button. To do this you can change the default value "normal" to "section" for the parameter nav.sec.firstEntry.

Using these parameters in combination with the CSS classes discussed before and the images for buttons, banners and so on you can create quite different looking sites without much effort. If you want even more flexibility you have to write your own stylesheets, which offers you every flexibility to design your own look. An example for a non-standard layout created with XWeb is the Tockit site where the main navigation is at the top and the secondary to the left. The sources are in the XWeb distribution as example.