(Quick Reference)

nav:set

Purpose

You can call this tag from inside a controller or GSP if you need to set any navigation values.

You can use this to "fudge" the current request's activation path. This is only necessary if there is no controller/action available on the current request, or if you need to simulate navigation while ignoring the real current activation path.

You may need to do this inside an error.gsp for example.

You can also set the current navigation scope, for example to use a generic layout that calls nav:primary to display your "admin" menu instead of the default "app" menu.

Example

<html>
<body>
    <!-- pretend we are in support/error even though we are in a GSP with no controller -->
    <nav:set path="admin/support/error"/>
    <nav:set scope="admin"/>

    <nav:primary/>
    <nav:secondary/>

    <p>Something went wrong!</p>
</body>
</html>

Attributes

NamePurpose
pathOptional - activation path to use
scopeOptional - default scope to use