cms icon indicating copy to clipboard operation
cms copied to clipboard

[5.x]: Manual sorting of routes is not accessible

Open MoritzLost opened this issue 7 months ago • 2 comments

What happened?

Description

I was looking for a way to define the order of precedences for routes defined in Settings → Routes in the Control Panel. I discovered by accident that you can drag-and-drop the routes to rearrange them, and that the order in which they are placed determines the precedence if more than one route can apply to a given URL.

I can't find any documentation for this feature, and the interface doesn't provide any affordance for this UI interaction.

Expected behavior

  • Add drag handles to the routes to indicate that they can be rearranged through drag-and-drop, similar to elements in a structure.
  • The fact that the order of the routes determines the order of precedence should be noted on that page itself, and/or in the documentation on dynamic routes.
  • I don't think there's a keyboard alternative for the drag-and-drop interaction, that should probably be added as well?

Craft CMS version

5.8.11

PHP version

8.3

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

MoritzLost avatar Jul 29 '25 14:07 MoritzLost

Hi Moritz, thanks for reporting! I raised a PR to add the drag handle and actions menu with the reorder options.

i-just avatar Aug 04 '25 12:08 i-just