...
- To change the title of a Page which is already included in the current Section: type the url for the page (either the full root-relative url e.g.,"/foo/bar/baz.html" or just the file name e.g., "baz.html") in the Url field and a new title in the Title field.
- To add a Page which is not currently included in the current Section, because it is has a non-html-like file extension: type the url for the page (either the full root-relative url for the page, e.g., "/foo/bar/baz.txt", or just the file name e.g., "baz.txt") into the Url field and the desired title in the Title field.
- To add a Page which is not currently included in the current Section, because you want to cross-link it from somewhere else in the site: type the full root-relative url for the page, e.g., "/other/folder/thing.html", into the Url field and the desired title in the Title field.
- To add a Page which is not currently included int he current Section, because it is a link to an external web page: type the absolute url for this page, e.g., "http://web.mit.edu.ezproxyberklee.flo.org/", into the Url field and the desired title in the Title field.
- To change the order of a Page or a Section which is already included in the current Section: enter its url (root-relative or file name) into the Url field and the desired title in the Title field, and change the order of the Link by clicking the up or down arrow buttons in the form.
listingNote title Note Note that any Links that are explicitly included in the navigation.xml file will come first in the listing for the current Section
in, before any Sections or Pages which are automatically included by default. If you want fine-tuned control over the order of all the Sections and Pages
within the current Section, you will need to create Links for all of them.
(Does that make sense? Maybe that was too complicated, but the upshot is this: the Link fields specify the Pages that appear in the current Section.)
...
Name | Type | Description |
---|---|---|
title | String | the title for this Page or Section. |
url | String | the URL for this Page or Section. |
breadcrumb | java.util.List<Page> | the breadcrumb for this Page or Section. This is a List of all this Page's ancestors in the site tree, starting from the Home section and ending at the current Page. You can iterate through this collection using the <c:forEach> tag in the JSTL. |
containingSection | Section | this Page's parent Section. This is nullif the current Page is the home section (root) of the site tree. The containingSection has the current Page as one of its subpages. |
isASection | boolean | true if the current Page is also a Section (can have subpages). |
subpages | java.util.Collection<Page> | if this Page is also a Section: a Collection of all the Pages and Sections contained in this Section. Every element in this Collection has the current Page as its containingSection. You can iterate through this collection using the <c:forEach> tag in the JSTL. |
isExternal | boolean | true if the current Page corresponds to a local root-relative url in the current webapp. |
Tag descriptions
...
The following section describes the tags in the navigation tag library, as well as giving some example of how they are used in conjunction with the above bean properties.
<nav:setSiteTreeVar>
This <nav:setSiteTreeVar> action sets a scoped variable to the object representing the current site tree. The site tree bean is useful for a JSP which generates a Site Index or Site Map page. Once you have set a variable to the site tree bean, you can walk through it with the <nav:treeWalk> and <nav:subTreeWalk> tags.
...
No Format |
---|
<nav:setSiteTreeVar var="theSiteTree" /> The Site Tree was last updated at <fmt:formatDate value="${theSiteTree.lastUpdated}" pattern="h:mm:ss a" /> |
And a possible output for this example:
Panel |
---|
The Site Tree was last updated at 11:17:30 AM |
<nav:treeWalk> and <nav:subtreeWalk>
...
No Format |
---|
<nav:setSiteTreeVar var="theSiteTree" /> <h3><ul><li><ul><li> <nav:treeWalk root="${theSiteTree.homeSection}" var="page"> <a href="${page.url}" ><c:out value="${page.title}" /></a>:<br/> <ul><c:forEach items="${page.subpages}" var="subpage"> <li><nav:subtreeWalk subroot="${subpage}" /></li> </c:forEach></ul> </nav:treeWalk> </li></ul></h3>ul> |
<nav:setBreadcrumbVar>
And a possible output for this example:
Panel |
---|
Home:
|
<nav:setBreadcrumbVar>
This <nav:setBreadcrumbVar> action This <nav:setBreadcrumbVar> action sets a scoped variable to an object representing the breadcrumb for a particular target url in the site. In this case, the breadcrumb object is a list of the target's ancestor pages, starting from the home page of the site and ending at the target page. This is useful for a JSP which generates a breadcrumb for the current page. Once you have set a variable to a breadcrumb object, you can iterate through it within a <c:forEach> tag.
...
No Format |
---|
<nav:setBreadcrumbVar var="breadcrumb" /> <c:forEach var="page" items="${breadcrumb}" varStatus="status"> <c:if test="${not status.first}">></c:if><a href="${page.url}" ><c:out value="${page.title}" /></a> </c:forEach> |
And a possible output for this example:
Panel |
---|
Home > Pets > Dogs |
<nav:setPageVar>
This <nav:setPageVar> action sets a scoped variable to an object representing the navigation information for a particular target url in the site. This is useful for a JSP which needs to know, for example, the list of links for the current page or section.
...
No Format |
---|
<nav:setPageVar var="page"/> <c:forEach var="subpage" items="${page.subpages}" > • <a href="${subpage.url}" ><c:out value="${subpage.title}" /></a><br/> </c:forEach> |
And a possible output for this example:
Panel |
---|
|