A micronavigation is a path as HTML text in which every element except for the last is linked with the corresponding web page. Using an NPSOBJ tag you can have micronavigations automatically created, whereby you can determine the number of created elements.
<npsobj micronavigation="field-name" levels="3">delimiter</npsobj>
When the CMS processes the micronavigation
instruction it forms the path
from the base folder to the folder containing the current file, creating an
a-href
reference for every element. The link to the corresponding
folder-index page is created as href
, and the value of the field
field-name
is used in the context of the respective target folder as the
link’s reference text.
The individual elements separated by the entered string delimiter
are
output one after the other. You can use any separation string you wish, which means that
even HTML code such as line breaks, links to images, etc. are allowed.
Using the tag attribute levels
you can set the number of elements to be
included in the micronavigation. If levels
is a positive number, the base
folder will be the micronavigation’s first element. A negative value indicates that only
the last elements in the path are to be used. This means that in a micronavigation
constructed with levels="1"
only the base folder will be included whereas
with levels="-1"
the micronavigation will only contain the folder containing
the current file. levels="0"
has the same effect as not specifying levels at
all which means that the complete path is to be included in the micronavigation.
The following example creates a micronavigation from the titles of the parent folders and limits it to three elements. The entries are separated from one another with a slash:
<npsobj micronavigation="title" levels="3"> / </npsobj>
This NPSOBJ tag creates the following micronavigation on the web pages exported from the folder sub-hierarchy /de/company/press/archive:
Displayed file | Created micronavigation |
/de | Title of the base folder |
/de/company | Title of the base folder / German |
/de/company/press | Title of the base folder / German / The company |
/de/company/press/archive | Title of the base folder / German / The company |
All entries in the generated micronavigation are linked to the corresponding folder pages.
If you wish the last parent folder in the path to be displayed in the micronavigation,
then the NPSOBJ attribute levels
must be assigned a negative value:
<npsobj micronavigation="title" levels="-2"> / </npsobj>
On the web pages exported from the folder sub-hierarchy
/de/company/press/archive, this NPSOBJ tag creates the following
micronavigation (a micronavigation can be inserted anywhere you like within the
body
element of a layout):
Displayed file | Created micronavigation |
/de | Title of the base folder |
/de/company | Title of the base folder / German |
/de/company/press | German / The company |
/de/company/press/archive | The company / Press |