You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Arnaud Heritier (JIRA)" <ji...@codehaus.org> on 2005/08/22 13:42:09 UTC

[jira] Updated: (MPXDOC-24) add a navbar in site.jsl

     [ http://jira.codehaus.org/browse/MPXDOC-24?page=all ]

Arnaud Heritier updated MPXDOC-24:
----------------------------------

    Assign To:     (was: Arnaud Heritier)

> add a navbar in site.jsl
> ------------------------
>
>          Key: MPXDOC-24
>          URL: http://jira.codehaus.org/browse/MPXDOC-24
>      Project: maven-xdoc-plugin
>         Type: Improvement
>     Reporter: gilles dodinet
>     Priority: Minor

>
>
> I needed a navbar for some guide navigation. instead of a patch i attach here the jelly xsl template that produce a navbar from a <navbar/> tag. 
> this tag can have 'prev', 'toc' and 'next' attributes. If one is present a link is generated using the attribute value. This is not something big, altho i find it useful. Also please not im no jelly guru, and thus even if the double if/if sequence could certainly be made prettier..
>   <!-- process a guide-like navbar -->
>   <jsl:template match="navbar" trim="false">
>   	<x:set var="_prev" select="string(@prev)"/>
>   	<x:set var="_toc" select="string(@toc)"/>
>   	<x:set var="_next" select="string(@next)"/>
>   	<div align="center" class="navbar">
>   	[ 
>   		<j:if test="${ ! empty(_prev) }"><a href="${_prev}">previous</a></j:if>
>   		<j:if test="${ empty(_prev) }">previous</j:if>
>   	|
>   		<j:if test="${ ! empty(_toc)}"><a href="${_toc}">toc</a></j:if>
>   		<j:if test="${ empty(_toc) }">toc</j:if>
>   	|
>   		<j:if test="${ ! empty(_next)}"><a href="${_next}">next</a></j:if>	
>   		<j:if test="${ empty(_next)}">next</j:if> 
>   	]
>   	</div>
>   </jsl:template>
> example of use : 
> - developer-guide.xml : navbar next="guide/relationships.html"/>
> - relationships.xml : <navbar toc="../developer-guide.html" next="building.html"/>
> - buidling.xml : <navbar prev="relationships.html" toc="../developer-guide.html" next="guidelines.html"/>
> - guidelines.xml : <navbar prev="building.html" toc="../developer-guide.html"/>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org