Currently both Search module and Path module (for the 'URL aliases' page) use the same weight of -10 for their respective router items. This means that I cannot insert any thing (e.g. another search-related module) in between the two to group it more logically with Search without implementing hook_menu_alter().
An easy fix with no impact on the core UI is to weight 'URL alias' at -5.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1118502-path-weight-1.patch | 517 bytes | pwolanin |
Comments
Comment #1
pwolanin commentedtrivial 1-line patch.
Comment #2
dave reidNot sure why we even need weight at all?
Comment #3
pwolanin commentedFYI, there are only 3 core modules that add links to the admin/config/search section:
search: 'admin/config/search/settings', weight -10
path: 'admin/config/search/path', weight -10
system: 'admin/config/search/clean-urls', weight +5
So this would not change their ordering, nor change the fact that by default contrib modules would appear between 'URL aliases' and 'Clean URLs'
Comment #4
pwolanin commented@Dave Reid - I guess just because we expect the two core items to be important things people will want to see first.
Also, having a spread of weights allows contrib modules to group their links with the relevant core module (if any).
In any case, I'm not out to debate anything bigger than this one line change.
Comment #5
jhodgdonIt seems like the change is reasonable.
Comment #6
dries commentedCommitted to 7.x and 8.x. Thanks!