---
title: "Generator: GetNavigation"
source: https://dev.pageseeder.com/reference/advanced/website/berlioz/generators/org.weborganic.bastille.psml.GetNavigation.html
description: "This generator returns the content of the navigation file"
last_updated: 2026-09-05T23:18:18+10:00
tokens: ~536
---

# Generator: GetNavigation

| Property | Value |
| --- | --- |
| Class name: | org.weborganic.bastille.psml.GetNavigation |
| Version: | 0.7.0 - 6 October 2012 |
| Library: | Bastille |
| Cacheable: | Yes |
| Generated: | 2012-12-21 |

## Description

This generator returns the content of the navigation file in PSML located in `/config/navigation.psml`.

This generator is provided for convenience and behaves as if it were the [GetConfigFile](org.weborganic.bastille.psml.GetConfigFile.md) with the path parameter set to ‘navigation’. It results in a less verbose code for websites that use a file for their global navigation.

### Configuration

No configuration is required.

The root of the PSML folder can be configured using the global property `bastille.psml.root` which can be either an absolute path or a relative path from the global repository.

By default, the PSML root is set to `psml` which usually corresponds to the `/WEB-INF/psml` folder of your Web app.

### Parameters

This generator does not require or accept any parameter.

### Returned XML

This generator wraps the content of the file with the `<psml-file>` element.

See the following:

```xml

<psml-file name="navigation.xml" base="/config/" status="[status]">
  <!-- PSML navigation file content -->
</psml-file>
```

### Error handling

If the navigation file cannot be found or read, this generator returns the following:

```xml

<psml-file name="navigation.psml" base="/config/" status="not-found">
Unable to find file: [path]
</psml-file>
```

The status of this generator is set to ‘NOT\_FOUND’.

### Usage

Following is the code to include in the [services](../configuration/services.md):

```xml

<generator class="com.weborganic.bastille.psml.GetNavigation" ... />
```

Note that it is equivalent to:

```xml

<generator class="com.weborganic.bastille.psml.GetConfigFile" ... >
  <parameter name="path" value="navigation"/>
</generator>
```

#### Example: main navigation

The most common configuration is:

```lnag-xml

<generator class="com.weborganic.bastille.psml.GetNavigation" 
           name="navigation"
           target="navigation"/>
```

