Naviwork

Naviwork is also part of the Logabit WebTools, but completely seperated from the Patchwork part. It is a powerful tool that allows you to define the structure of your website at one central place and then reuse this structure several times without any redundancy.

The features of Naviwork

Avoids redundancy

Let's assume one builds his website the old way: Hard coded navigation on the left. Every time he wants to refer to an item of this navigation from within his website he has to hardcode the link as well. For example like this:

<a href="news">Company News</a>

But what happens if the uri of that link will change, for example if you would like to introduce a suffix like .html afterwards? Yes, go thru all of your templates and text and change the uri news to news.html. This is a lot of boilerplate work.

In Naviwork every item gets an unique id. You can use this id to refer to the navigation item's uri like this example shows:

<a href="${navi.allEntries.news.uri}">Company News</a>

And if the uri changes sometime, nothing to change in your template!

Breadcrumb

Naviwork automatically generates a breadcrumb object for the current request. This is a path that contains all navigation items from the root to the currently selected one. It is provided as list and therefore you can easily iterate over this list to display the breadcrumb on your website.

Mark current item

Naviwork marks automatically the navigation item that belongs to the current request. Within your template you have the possibility to ask an navigation item whether it is the currently selected one. This is very useful in order to mark the selected entry in your navigation bar or to change the view depending on the current selection.

Naviwork is fast

Naviwork caches the navigation structure of your website. And every time you access it, it will return a cached instance without any huge logic to process. Most of that was done during parse time which will occur only once if you have changed the navigation definition document.

Supports internationalization

Because of the fact that you can use a i18n key as label in your naviwork definition, i18n in conjunction with Cocoon is easily possible.

Easy website sitemap creation

The whole navigation structure of your website is placed in the naviwork definition as XML. Therefore it is very easy to write an XSLT-Stylesheet that transforms this XML document into a representation to be used within your website.

And if you're not familiar with XSLT, use the navigation root bean and read recursively all navigation entries in order to build your website sitemap!