Allow the use of items' attributes 'target' and 'img' for breadcrumbs entries in the navigation file.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@386891 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
aheritier 2006-03-18 22:21:29 +00:00
parent 14987d4613
commit 0236ebabdb
3 changed files with 23 additions and 18 deletions

View File

@ -651,6 +651,20 @@
</x:element>
</jsl:template>
<!-- Process additional powered-by's -->
<jsl:template match="powered-by" trim="true">
<x:forEach var="link" select="item">
<x:set var="poweredbyimage" select="string(@img)"/>
<x:set var="poweredbytitle" select="string(@name)"/>
<x:set var="poweredbyurl" select="string(@href)"/>
<j:if test="${!empty(poweredbyimage)}">
<a id="poweredByExternal" href="${poweredbyurl}" title="${poweredbytitle}">
<img alt="${poweredbytitle}" src="${poweredbyimage}" />
</a>
</j:if>
</x:forEach>
</jsl:template>
<!-- Process the links navbar -->
<jsl:template match="links" trim="true">
<j:set var="linkCount" value="1"/>
@ -671,29 +685,19 @@
</x:forEach>
</jsl:template>
<!-- Process additional powered-by's -->
<jsl:template match="powered-by" trim="true">
<x:forEach var="link" select="item">
<x:set var="poweredbyimage" select="string(@img)"/>
<x:set var="poweredbytitle" select="string(@name)"/>
<x:set var="poweredbyurl" select="string(@href)"/>
<j:if test="${!empty(poweredbyimage)}">
<a id="poweredByExternal" href="${poweredbyurl}" title="${poweredbytitle}">
<img alt="${poweredbytitle}" src="${poweredbyimage}" />
</a>
</j:if>
</x:forEach>
</jsl:template>
<!-- Process the breadcrumb navbar -->
<jsl:template match="breadcrumbs" trim="true">
<x:forEach var="link" select="item">
<x:set var="_img" select="string(@img)"/>
<x:set var="_name" select="string(@name)"/>
<x:set var="_link" select="string(@href)"/>
<a href="${_link}">${_name}</a>
&#160;<span class="separator">&gt;</span>&#160;
<x:set var="_target" select="string(@target)"/>
<j:whitespace trim="false">
<doc:itemLink name="${_name}" link="${_link}" img="${_img}" target="${_target}"/>&#160;<span class="separator">&gt;</span>
</j:whitespace>
</x:forEach>
</jsl:template>
<!-- Process a menu for the navigation bar -->
<jsl:template match="menu" trim="true">
<x:set var="_menuName" select="string(@name)"/>

View File

@ -27,6 +27,7 @@
</properties>
<body>
<release version="1.10-SNAPSHOT" date="in SVN">
<action dev="aheritier" type="add">Allow the use of items' attributes 'target' and 'img' for breadcrumbs entries in the navigation file.</action>
<action dev="aheritier" type="update">In breadcrumbs, use for the project's name nav.title if defined, pom.name otherwise.</action>
<action dev="aheritier" type="fix">Display the "external link" icon only if the link host is different from the project url (pom.url).</action>
<action dev="aheritier" type="fix">Fix generated pages titles: [breadcrumbs]* &gt; [nav.title | pom.name]+ &gt; doc.title</action>

View File

@ -165,7 +165,7 @@
The <code>xdoc:navigation-validate</code> goal can be used to check
whether your <code>${maven.xdoc.navigation.file}</code> is a valid
navigation.file. Validation is performed against this
<a href="maven-navigation.xsd">xsd</a>. Note that the order of
<a href="../maven-navigation.xsd">xsd</a>. Note that the order of
elements is important and should be the same as in the example above.
</p>
</section>