Elefant features a Navigation tool under the Tools menu that you can use to build dynamic navigation on your website. Once you've created your pages, go to Tools > Navigation to add them to the site menus.
Elefant's dynamic navigation tree is separate from the page list itself for two reasons:
That's why we keep the two separate and keep things simple and predictable for Elefant site editors.
The Navigation tool uses a two-column layout, with the site tree on the left, and pages not yet included in the site tree on the right.
To include a page in the site tree, drag it from the right column into the site tree on the left. Here's the same screenshot after the Consulting page has been added under Services in the site tree:
To re-order pages, simply drag and drop them around the site tree. This screen gives you full control of your site navigation, and changes are automatically saved behind-the-scenes.
To add a dynamic navigation element to an editable area of your site, click the edit button for the block you want to add it to. In the body field, click the Dynamic Objects button on the far right of the WYSIWYG editor:
This will open the Dynamic Objects dialog:
In the dialog, find the Navigation objects. Click the paging buttons (""1, 2, 3"") at the bottom of the list to move through the list of objects. Let's choose the ""Navigation: Contextual"" object and embed it:
Now you can save the changes and you'll see the contextual navigation dynamically inserted into your page where the block appears. There are several types of built-in navigation to choose from:
All of the navigation objects simply generate a standard unordered list in HTML. However, the current page's <li>
is given a class=""current""
and parents of it in the contextual menu are given a class=""parent""
. With these, we can create a series of custom styles for each aspect of the contextual menu as follows:
/* Top-level links */
#sidebar ul li a {
font-weight: bold;
color: #666;
}
/* Sub-level links */
#sidebar li li a {
font-weight: normal;
}
/* Parent links of current page */
#sidebar .parent>a {
color: #E4426B;
}
/* Current page link */
#sidebar .current>a {
font-weight: bold;
font-style: italic;
color: #E4426B;
}