# Navigation Panel won't save changes in order

**URL:** <https://forum.xwiki.org/t/navigation-panel-wont-save-changes-in-order/4650>\
**Category:** Help / Discuss\
**Tags:** navigation, reorder\
**Created:** [March 19, 2019, 12:19pm UTC](https://forum.xwiki.org/t/navigation-panel-wont-save-changes-in-order/4650 "2019-03-19T12:19:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lange](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/l/848f3c/32.png) [@Lange](https://forum.xwiki.org/u/Lange)\
**Post date:** [March 19, 2019, 12:19pm UTC](https://forum.xwiki.org/t/navigation-panel-wont-save-changes-in-order/4650/1 "2019-03-19T12:19:41Z")

</div>

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](https://discourse.xwiki.org/uploads/default/original/2X/6/6b509b2a8a420d85912f5baad2422da8fd9bfc5e.png)

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [March 19, 2019, 12:25pm UTC](https://forum.xwiki.org/t/navigation-panel-wont-save-changes-in-order/4650/2 "2019-03-19T12:25:26Z")

</div>

It’s ordered alphabetically. It’s using the documentTree macro: [https://extensions.xwiki.org/xwiki/bin/view/Extension/Document%20Tree%20Macro](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](https://extensions.xwiki.org/xwiki/bin/view/Extension/Tree%20Macro)

---

<div class="post-metadata">

**Author:** ![Lange](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/l/848f3c/32.png) [@Lange](https://forum.xwiki.org/u/Lange)\
**Post date:** [March 19, 2019, 1:14pm UTC](https://forum.xwiki.org/t/navigation-panel-wont-save-changes-in-order/4650/3 "2019-03-19T13:14:21Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [March 19, 2019, 1:57pm UTC](https://forum.xwiki.org/t/navigation-panel-wont-save-changes-in-order/4650/4 "2019-03-19T13:57:58Z")

</div>

> [@Lange](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![gumn](https://forum.xwiki.org/user_avatar/forum.xwiki.org/gumn/32/1464_2.png) [@gumn](https://forum.xwiki.org/u/gumn)\
**Post date:** [October 16, 2020, 1:20pm UTC](https://forum.xwiki.org/t/navigation-panel-wont-save-changes-in-order/4650/5 "2020-10-16T13:20:07Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![mflorea](https://forum.xwiki.org/user_avatar/forum.xwiki.org/mflorea/32/49_2.png) [@mflorea](https://forum.xwiki.org/u/mflorea)\
**Post date:** [October 16, 2020, 1:33pm UTC](https://forum.xwiki.org/t/navigation-panel-wont-save-changes-in-order/4650/6 "2020-10-16T13:33:41Z")

</div>

> [@gumn](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![gumn](https://forum.xwiki.org/user_avatar/forum.xwiki.org/gumn/32/1464_2.png) [@gumn](https://forum.xwiki.org/u/gumn)\
**Post date:** [October 16, 2020, 1:40pm UTC](https://forum.xwiki.org/t/navigation-panel-wont-save-changes-in-order/4650/7 "2020-10-16T13:40:37Z")

</div>

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.
