| <?xml version="1.0"?> |
| <!-- |
| Copyright 2004-2005 The Apache Software Foundation or its licensors, |
| as applicable. |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <document> |
| <properties> |
| <title>Examples</title> |
| </properties> |
| <body> |
| <section name="Displaying a menu"> |
| <p> |
| JCR tags contains a few Traversers which will help you |
| on drawing trees. |
| </p> |
| <subsection name="ExpandedNodeTraverser"> |
| <p> |
| With this traverser you get a menu with only one |
| node expanded. |
| </p> |
| <p> |
| <jcr:nodes |
| <br /> |
| node="/" |
| <br /> |
| var="node" |
| <br /> |
| traverserID="org.apache.jackrabbit.tags.traverser.ExpandedNodeTraverser" |
| <br /> |
| traverserParam="/pathToMyNode/myNode" |
| <br /> |
| traverserDepth="5"> |
| <br /> |
| <br /> |
| <c:forEach begin="0" end="${node.depth}"> |
| <br /> |
| &nbsp; |
| <br /> |
| </c:forEach> |
| <br /> |
| / <c:out value="${node.name}"/><br/> |
| <br /> |
| </jcr:nodes> |
| <br /> |
| </p> |
| </subsection> |
| </section> |
| </body> |
| </document> |