Changing link order in Drupal 8 menus
Once you have created your menu, it is quite possible that you will add additional item links later and at some point, need to rearrange them. This is very easy to do within Drupal as it uses a weighting concept. Below is a quick guide on how to rearrange item links within your Drupal 8menus.
How to reassign the order of links in your Drupal 8 menu
- Log into your Drupal 8 admin interface.
- From the top menu select the Menu option.
- A secondary menu will appear just under the first. From here, click on the Structure option.
- From the Structure list, click on the Menu option.
- You will see the memu listing page. From here, locare the menu you want to work with and select the Edit Menu link from the dropdown on the right side of the row.
We are now in the link list for the selected menu. There are two ways to change the order of the links. The first is to simply drag and drop them into the desired order by dragging the cross-shaped icon on the fer left.
The other way is to click on the Show row weights link on the right hand side of the row list. This will display a Weights column for each row. Set the number of this column to determine the display order. The higher the number, the 'heavier' the link will be, making it display lower in the list (for vertical menus) or more to the right (for horizontal menus).
You are NOT logged in. You can still browse our Support Center.
To participate within our Community Support Forum:
2016-03-23 1:25 am
Everything works fine until I clear the cache. After 'drush cr' I get the 'old' order of menu links. Updated to 8.0.5 today.
2016-03-23 8:36 am
According to the Drupal documentation, there is also a 'drush rebuild' command. There is also a theme cache that may need to be cleared as well. The link I provided also suggests alternatives.