Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SADE
SADE
Commits
a86b6f4a
Commit
a86b6f4a
authored
Mar 13, 2020
by
mrodzis
💪
Browse files
Add info on how to customize navigation (closes
#104
)
parent
c36670ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
docs/customization.md
View file @
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.
repo.xml
View file @
a86b6f4a
...
...
@@ -14,12 +14,13 @@
<prepare>
pre-install.xq
</prepare>
<finish>
post-install.xq
</finish>
<changelog>
<change
version=
"
4.2
.0"
>
<change
version=
"
5.0
.0"
>
<ul
xmlns=
"http://www.w3.org/1999/xhtml"
>
<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>
</ul>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment