5.3Navigation

Creating a separate navigation structure allows the full control over the navigation but it requires several documents to be created and to be linked to each other.

Create a navigation tree

At first create a document type navi. Fill the document type with the following fields:

  • title - string
  • linkinternal - link
  • linkexternal - string
  • linktype - integer
  • linkparameter - string
  • children - link

With this document type create one root navi document and a list of navi entries. Now add the navi entries into the root navi document into the linklist children in a respecive order. In our example the root navi document has no link and no title. This is just the container to list the children in order.

Fill the navi entries with Titles (shown as Navi text) and add link targets either as internal links to content pages into linkinternal or external URLs into linkexternal.

Now the document structure of Navi document could look like this:

graph TD subgraph Navi documents naviroot[Navi root] -.- nav1(Navi Mammals home) nav1 -.- nav2(Navi Cats home) nav1 -.- nav3(Navi Dogs home) nav2 -.- nav21(Navi Siams) nav2 -.- nav22(Navi Persian) end

The navigation structure of cmsWorks

In combination with the category tree

Now combine the Navigation structure to the category tree. Assuming there is a category "Cats". This category can be referencing a configuration task of type "Navi" which is referencing the Navigation document "Navi Cats home". With this declaration any content page (incuding the cats home itself) selecting the category "Cats" will automatically select the navigation entry "Navi Cats home". Additionally there would be needed a second configuration task type "Navi root" referencing the root document of the Navigation. This configuration task would be placed at the category root so from every category the configuration task "Navi root" can be found from the inheritance mechanism of the categories.

A linking structure in combination with the category tree looks like this:

graph TD subgraph Categories catroot[root] -.- cata(reptiles) catroot -.- catb(mamals) catroot -.- catc(insects) catb -.- catba(cats) catb -.- catbb(dogs) end subgraph Config tasks configtaskroot[naviroot] configtasknavi1[navi] configtasknavi2[navi] configtasknavi3[navi] end subgraph Navi documents naviroot[Navi root] -.- nav1(Navi Mammals home) nav1 -.- nav2(Navi Cats home) nav1 -.- nav3(Navi Dogs home) nav2 -.- nav21(Navi Siams) nav2 -.- nav22(Navi Persian) end catroot ---> configtaskroot configtaskroot ---> naviroot catb ---> configtasknavi1 configtasknavi1 ---> nav1 catba ---> configtasknavi2 configtasknavi2 ---> nav2 catbb ---> configtasknavi3 configtasknavi3 ---> nav3

The navigation structure and category integration in cmsWorks