Commit 60ba1062 authored by mrodzis's avatar mrodzis 🦊

Merge branch 'feature/#104-navigation-docs' into 'develop'

Add info on how to customize navigation (closes #104)

Closes #104

See merge request !85
parents 6907d27e a86b6f4a
# Customization
SADE has been built to fit the needs of many projects creating digital editions.
For a complete customization, an adaption of some XQuery modules may become
necessary. But a few things are made to being set up by any user, as long as she is
familiar with the basics of XML. When you want to start preparing your own
instance, look at the file `config.xml` in the root collection of the application.
There are many things you can set up.
## Top Menu
Edit the top menu (navbar) by entering your preferred structure in the file
`navigation.xml`.
SADE has been built to fit the needs of many projects creating digital editions. A few
things can be set up by any user who is familiar with the basics of XML but for a deeper
customization, an adaption of some XQuery modules may become necessary. If you want to
start preparing your own instance, look at the `config.xml` file in the root collection
of the application to set up the basics.
## Top Menu / Navigation
### General
SADE provides an out-of-the-box mechanism to customize the website's top navigation. It
is possible to add simple **buttons** or **dropdown menus**. All necessary adjustments
can be made in the `/db/apps/sade/nagivation.xml` file.
The configuration for the navigation shipped with SADE is this:
```xml
<navigation>
<item label="Ein Text" link="view.html?id=text.md"/>
<submenu label="Links">
<item label="http://textgrid.de" link="http://textgrid.de"/>
<item label="Über SADE" label-en="About SADE" link="docs/about.md"/>
<submenu label="Dokumentation" label-en="Documentation">
<item label="Installation" label-en="Install" link="docs/install.md"/>
<item label="Features" label-en="Features" link="docs/features.md"/>
...
</submenu>
<submenu label="Weiterführende Links" label-en="Further Links">
<item label="TextGrid Benutzerhandbuch" link="https://dev2.dariah.eu/wiki/display/TextGrid/User+Manual+2.0"/>
<item label="TextGrid Homepage" link="http://textgrid.de"/>
</submenu>
</navigation>
```
In case you want to add a new top level link to the navigation, simply add a new `item`
node as a child node of `navigation`, e.g.:
```xml
<item label="Metadata" link="view.html?id=metadata.md"/>
```
In the `label` attribute you can provide the link's text whereas the `link` attribute
holds the path to the target resource.
To create a label for a dropdown selection of links, add a `submenu` node as a child
node of `navigation` with as many `item`s as you wish. Each `item` will be rendered as
a link in the dropdown menu.
```xml
<submenu label="Features">
<item label="Feature 1" link="some/path/feature1.md"/>
<item label="Feature 2" link="some/path/feature2.md"/>
<item label="Feature 3" link="some/path/feature3.md"/>
</submenu>
```
### Navigation labels and multilingual support
Both the `item` and `subitem` nodes have a `label` attribute from which the text to be
displayed is taken by default. In case you have [**multilanguage**](multilingual.md)
support enabled, you can add more labels for other languages, e.g. `label-en` or
`label-es`. Please note that these have to be listed in the multilanguage module
configuration at `config.xml` as well; otherwise switiching languages might not work.
......@@ -19,7 +19,8 @@
<li class="feat">Features
<ul>
<li>Add a documentation on release procedure</li>
<li>Add document how to use faceted search</li>
<li>Add documentation on how to use faceted search</li>
<li>Add documentation on how to customize the top navigation</li>
<li>Pretty print test results on command line</li>
<li>Server side pagination for search.html</li>
<li>Enhance documentation about how to install SADE</li>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment