Navigation Panel won't save changes in order

Hello there,

I have a simple question concerning the order at the left navigation panel.

As you can see on the pictures, I’m trying to change the order but it won’t get saved.
Did i miss something or do I have a problem in the system ?

I want to have
“Home” , “Stuff”, “Personal”, “IT”

but after saving the new order it’s back to the default order
“Home”, “IT”, “Personal”, “Stuff”

navigation-panel-1

It’s ordered alphabetically. It’s using the documentTree macro: https://extensions.xwiki.org/xwiki/bin/view/Extension/Document%20Tree%20Macro

One problem with non alphabetical sort is what do you do when a new page is added. If you put it at the bottom it may look weird.

If you need a static tree list, then you can use the tree macro and create your own panel and use that panel instead of the Navigation one. It’s very easy to do.

See https://extensions.xwiki.org/xwiki/bin/view/Extension/Tree%20Macro

Hi thanks for your very fast reply.

I’m going to check how this would work for me. It’s a bit complicated but I think I can figure it out.

Just the final questions, considering your answer:

Would you than rather do a default alphabetical order and then put a number to every department we have ? Like this:

01_Genral
02_Human_Resource (and here subpages in alphabetical order)
03_IT
04_Finance and Controling

It’s not so pretty with a number but I need a simple way to show the users where they have to find their stuff.

Or is there a best practice guide I’m missing right now ?

For that you just need a panel like the Quick Links one :slight_smile:

Nota Bene : for people using XWIKI in another language that English : I realized that it is the alphabetical order of the English name of the page when exist that count. I though “Accueil” will nearly always be first but as it is “Home” that count, it is not the case !

No. The sort is done taking into account the title of the translation page (e.g. “Accueil”), i.e. the sort depends on the current UI language. The problem is different: some pages are using Velocity code in their titles and this code is not evaluated when the sort is done. In other words, the sort is done on the raw page title (without executing the Velocity code). If the Velocity code from the page title starts with a symbol, like:

$services.localization.render('help.title')

then it will end up before “Accueil”.

The problem boils down to the fact that you can translate the page title in two ways:

  • by creating a page translation and modifying its title
  • by using translation keys in the page title, but this means using Velocity code

When you mix these two you don’t get nice sort results.

Thanks for the precision @mflorea , I’ll try to tidy up thing then ! But it is still interesting to report that the problem can occur I think.