left navigation pane ordering...

Rajendra Murakonda April 30, 2012

Hi,

I am programmatically creating a space with a set of pages in it. I have assumed that the pages appear in the left navigation pane in the order in whcich they were created. But the pages are not coming in that order. Infact they are not even fully alphabetical.

Is there any way to specify the ordering of pages in the left navigation pane programmatically?

Thanks,

Rajendra

4 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 10, 2012

In the theme configuration, disable the pagetree, then add the following to the navigation pane:

{pagetree:root=@home|sort=creation}

This is entirely safe for upgrade and also completely configurable from space to space.

Further information on configuring pagetree.

See also this related answer.

1 vote
MatthewC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 30, 2012

It's quite easy.... first find the doctheme-x.x.x.jar file with your version of Confluence. Take a copy of it and unzip it somewhere on your local hard disk.

Then go edit the file:

  • \doctheme\decorators\page.vmd

In there you will find a line something like:

        $helper.renderConfluenceMacro("{pagetree:root=@home}")


you want to replace it with something like

        $helper.renderConfluenceMacro("{pagetree:root=@home|sort=natural}")



You then want to re-zip the file making sure the atlassian-plugin.xml is at the top level.
You can then reload the plugin back into Confluence via the Plugin Manger.

for more info on page ordering and why your pges were not in order have look at

http://confluence.atlassian.com/display/DOC/Sequential+Order+of+Pages
http://confluence.atlassian.com/display/DOC/Setting+a+Page+Family+to+Alphabetical+Order
http://confluence.atlassian.com/display/DOC/Page+Tree+Macro



MatthewC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 30, 2012

Well, you've basically modified a confluence plugin and created your own version. So just like any other plugin you will have to "upgrade" it when you upgrade confluence. Since it's an easy change, it's probably simplest to take the latest doctheme jar and re-apply the change

Rajendra Murakonda April 30, 2012

Hi Matthew,

Thanks for the reply. If I do this, what will happen when we upgrade confluence? This change is lost?

Thanks,

Rajendra

0 votes
Rajendra Murakonda April 30, 2012

Hi David,

Yes, Confluence and documentation theme.

Thanks,

Rajendra

0 votes
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 30, 2012

Do you mean Confluence & the Documentatiuon theme? More details please.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events