2005-09-29 18:41:15 +00:00

144 lines
4.4 KiB
XML

<?xml version="1.0"?>
<!--
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
* 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>Navigation</title>
</properties>
<body>
<section name="The navigation file">
<p>
Here is a template for a typical navigation file:
</p>
<source><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="My project">
<title>My project title</title>
<body>
<breadcrumbs>
<item name="Home" href="/index.html"/>
.
</breadcrumbs>
<links>
<item name="Home" href="/index.html"/>
.
</links>
<menu name="Documentation">
.
</menu>
.
<search/>
<powered-by>
.
</powered-by>
<footer>
.
</footer>
</body>
</project>]]></source>
<p>
There has to be at least one <code>&lt;menu&gt;</code> element
present in the documents body, all other elements are optional.
The core elements of this navigation file are described in a
<a href="http://maven.apache.org/using/site.html#Creating_a_Site_Descriptor">section</a>
of the main Maven site, we'll just discuss the few additions here.
</p>
<subsection name="Breadcrumbs">
<p>
A list of items that are displayed on the top left of the site.
Check the top of this page for an example.
</p>
</subsection>
<subsection name="Menu">
<p>
The <code>&lt;menu&gt;</code> element takes an optional
<code>type</code> attribute which can be set to
"<code>header</code>" or "<code>footer</code>". This will put
the corresponding menu on top or on bottom of the navigation
menu, respectively.
</p>
<p>
To open a link in a new window, use the "target" attribute.
For example, for a menu item:
</p>
<source><![CDATA[<item name="Name" href="URL" target="_blank"/>]]></source>
<p>
XDoc automatically adds the "Opens in a new window" icon and
"New Window" tooltip to links with the "target" attribute.
</p>
<p>
XDoc also automatically adds the "External Link" icon and tooltip to
links referring to external sites (actually, any absolute url).
</p>
</subsection>
<subsection name="Google Search">
<p>
If a <code>&lt;search/&gt;</code> element is found in the
<code>navigation.xml</code> body, a search navigation menu is
generated that uses <a href="http://www.google.com">google</a>.
</p>
</subsection>
<subsection name="Additional 'powered-by' logos">
<p>
You can add additional 'powered-by' logos above the maven logo by
specifying a <code>&lt;powered-by&gt;</code> element in the body
of <code>navigation.xml</code>, e.g.:
</p>
<source><![CDATA[<powered-by>
<item
name="Hosted by SourceForge"
href="http://www.sourceforge.net"
img="http://sourceforge.net/sflogo.php?group_id=16035&amp;type=1"/>
</powered-by>]]></source>
<p>You may specify several items to include more logos.</p>
</subsection>
<subsection name="Footer">
<p>
You can use the <code>footer</code> tag for including text or
images just below the navigation menu and above the copyright notice.
This tag is only useful in the navigation.xml file and should be
placed within the body element. For example:
</p>
<source><![CDATA[<!-- footer will be placed above the (c) -->
<footer>
<a href="http://sourceforge.net/projects/ctecl">
<img src="http://sourceforge.net/sflogo.php?group_id=72748" border="0" alt="sf logo"/>
</a>
</footer>]]></source>
</subsection>
</section>
</body>
</document>