jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven 1.x XDoc Plugin
  • Maven 1.x XDoc Plugin
  • MPXDOC-24

add a navbar in site.jsl

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.10
  • Labels:
    None
  • Number of attachments :
    0

Description

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"/>

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Lukas Theussl added a comment - 12/Sep/05 12:06 PM

Done. Thanks!

Show
Lukas Theussl added a comment - 12/Sep/05 12:06 PM Done. Thanks!

People

  • Assignee:
    Lukas Theussl
    Reporter:
    gilles dodinet
Vote (0)
Watch (0)

Dates

  • Created:
    23/Nov/03 4:05 PM
    Updated:
    12/Sep/05 12:06 PM
    Resolved:
    12/Sep/05 12:06 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.