Navigation Plugin

Name Navigation Plugin
Vendor Pentagon Technologies (Website)
Authors David Peterson, Ruben Miranda
Homepage http://confluence.atlassian.com/display/CONFEXT/Navigation+Plugin
Issue Management http://jira.adaptavist.com/browse/NAVI
Categories Content Macros
Version 1.11
Availability Confluence v2.0 to v2.10-m1
State Stable
Support Unsupported Plugins
License Freeware / Open Source (BSD)
Price Free
Release Docs http://confluence.atlassian.com/display/CONFEXT/Navigation+Plugin
Java API Docs n/a
Download Source n/a
Download JAR navigation-plugin-1.11.jar
This plugin now accessable through the Confluence Repository Client.

Description

This set of macros displays links to pages within a specific hierarchy; currently {scrollbar} and (formerly) {noparent}.

Download & Installation

Confluence 1.4, 2.0 and 2.1

  1. Download: navigation-plugin-1.11.jar
  2. Upload into Confluence using the Plugin Administration console.

Confluence 1.3

  1. Download: macros-navigation.jar
  2. Drop into WEB-INF/lib inside your Confluence web application
  3. Restart Confluence

{scrollbar}

Usage

Syntax is as follows:

{scrollbar}

Parameters

  • up - (optional - default is true) If 'false', no link to the parent will be shown
  • icons - (optional - default is true) If 'false', no icons are shown
  • no-css - (optional - default is false) If 'true', no CSS style code is output, allowing overriding of the scrollbar table's style. The CSS classes to override are listed below:
    Class Description
    ScrollbarTable The style for the whole table
    ScrollbarPrevIcon The cell the left arrow is in, if present
    ScrollbarPrevName The cell the previous page name is in, if present
    ScrollbarParent The cell the parent page is in, if present
    ScrollbarNextName The cell the next page name is in, if present
    ScrollbarNextIcon The cell the right arrow is in, if present

Screenshot

Here's what the macro looks like when in use:

In this example, the hierarchy of the pages is as follows:

Table of Contents
 |
 |--> 01. Introduction
 |
 |--> 02. Housing
 |
 |--> 03. Vehicles

The order is determined alphanumerically.

Note also the following special cases:

  • For documents first in the hierarchy level, a previous link is not shown.
  • For documents last in the hierarchy level, a next link is not shown.
  • For only-child documents, only the 'up' link is displayed (if applicable).
  • For orphans, no 'up' link is displayed, but siblings are.
  • When in non-standard viewing modes (eg. printing) the scrollbar is hidden.

TODO

  • Push table generation to a Velocity template, for easier editing by decorators
  • Add a height parameter to retrieve previous, next links for the parent, grandparent, etc. (default currently would be 0)

See Also

{noparent}

Note

This macro has been removed in version 1.11 and beyond. Simply use {children:page=/} to achieve the same functionality as this macro.

Usage

Syntax is as follows:

{noparent}

This macro generates a bulleted list of pages that do not have a parent. The space's home page is excluded from the list.

The macro itself is similar to Confluence's own {children} macro - unfortunately {children} doesn't have a way to specify a null parent. I find this macro essential when Confluence newcomers add pages, but forget to specify a parent. "Where did my page go?" (Happens quite a bit.)

See Also

Open Issues

jiraissues: Could not download[ http://jira.adaptavist.com/secure/IssueNavigator.jspa?reset=true&pid=10037&statusIds=1&view=rss&sorter/field=issuekey&sorter/order=DESC&tempMax=25&reset=true&decorator=none] : caused by : Circular redirect to 'http://jira.adaptavist.com:80/secure/IssueNavigator.jspa'

Release History

Ver. Date Author Notes
1.11 10-Jan-05 David Peterson [CustomWare] release notes
1.10 17-Aug-05 David Peterson [CustomWare]
  • Added a 'no-css' parameter to allow overriding of the scrollbar's table formatting.
1.9 16-Aug-05 David Peterson [CustomWare]
  • Put the formatting for the {scrollbar} table into CSS styles to make it easier to theme.
1.8 16-Aug-05 David Peterson [CustomWare]
  • Made {scrollbar} invisible when in non-standard decorator modes (eg. printing).
  • Switched to using icons
  • Now works on parentless pages
1.7 18-May-05 David Peterson [CustomWare]
  • Fixed a rendering bug in {noparent} caused by the transition to the V2 renderer.
1.6 17-May-05 David Peterson [CustomWare]
  • Upgraded to the 1.4+ V2 Renderer. Will not work with 1.3 or below!
  • Now only requires one {scrollbar} entry if more than one exists on the page.
1.5 25-Apr-05 David Peterson [CustomWare]
  • Fixed table rendering issue in Confluence 1.4+
  • Fixed sorting issue with orphaned pages.
1.4 25-Apr-05 David Peterson [CustomWare]
  • Fixed bug when previewing a new, unsaved page with a scrollbar.
1.3 24-Apr-05 David Peterson [CustomWare]
  • Added 'up' link
1.2 11-Feb-05 Ruben Miranda
  • Added 'noparent' macro.
1.1 09-Feb-05 Ruben Miranda
  • Addresses issue with pages navigated via the viewpage.action servlet returning broken links.
1.0 01-Feb-05 Ruben Miranda
  • Original version

Labels

macro macro Delete
plugin plugin Delete
confluence13 confluence13 Delete
confluence14 confluence14 Delete
confluence20 confluence20 Delete
confluence21 confluence21 Delete
repository_current repository_current Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jan 15, 2006

    Guy Fraser says:

    It would be awesome if this plugin could have an output mode for an unordered li...

    It would be awesome if this plugin could have an output mode for an unordered list, eg:

    • Parent Page
    • Previous Sibling
    • Next Sibling

    This could be used in sidebars (eg. Page with 2 Sidebars Scaffold) and also menus when using the Builder theme.

  2. Mar 30, 2006

    Troy McKinnon says:

    Note: we are running - Version: 2.1.1 Build:#406 Dec 23, 2005

    Note: we are running - Version: 2.1.1 Build:#406 Dec 23, 2005

    1. Mar 30, 2006

      David Peterson [CustomWare] says:

      The original comment seems to have been deleted, but where you getting any error...

      The original comment seems to have been deleted, but where you getting any error messages at all, either on the page or in the webserver log files? I haven't seen that behaviour at all before.

      Also, is there any connection between the pages where it doesn't work? Are they all in the same space? Do they have a parent/do not have a parent? Do they have a particular character in their title?

      I'm not sure what would be causing this, but let me know if any of these apply...

      David

  3. Mar 20, 2007

    Chris Hegan says:

    Why does the scrollbar on Page 1 point to Page 10 as its next page? And the scro...

    Why does the scrollbar on Page 1 point to Page 10 as its next page? And the scrollbar on Page 10 points to Page 1 as its previous page, and what if anything can I do about it?

    Many thnx. 

    1. Mar 20, 2007

      David Peterson [CustomWare] says:

      The scrollbar macro decides which page is next or previous by sorting them into ...

      The scrollbar macro decides which page is next or previous by sorting them into alphabetical order. And "Page 10" comes before "Page 2" alphabetically.

      At the moment, the only option is to name your pages with leading '0's. Eg 'Page 01', 'Page 02' ... 'Page 10'. Of course, if you have more than 100 pages, you'll need two leading '0's (Page 001). And so on...

      Adding the ability to specify the sort order is on my wishlist, but I'm not sure there is actually an official JIRA request up for it.

      1. Mar 20, 2007

        Alain Moran says:

        The pagetree macro contains an open-source natural sort alogrithm which could be...

        The pagetree macro contains an open-source natural sort alogrithm which could be used to rectify this problem.

        Builder 2.1 will include 'next', 'previous' and 'parent' menulinks that will both take advantage of the natural sort, as well as the arbitary (page metadata) sort order used by pagetree2 (If you are interested I can give you code to integrate compatibility into the navigation plugin)

  4. Dec 03, 2007

    Todd Katz says:

    In limited testing of the {scrollbar} macro it seems that the navigation icons...

    In limited testing of the

    {scrollbar}

    macro it seems that the navigation icons and links do not reliably carry over to the PDF and HTML output options provided with Confluence. I know this is an atypical use, but thought I'd mention it just in case I'm incorrect about this and to save others the trouble in case my finding is accurate.