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.

CommentFileSizeAuthor
#1 1118502-path-weight-1.patch517 bytespwolanin

Comments

pwolanin’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new517 bytes

trivial 1-line patch.

dave reid’s picture

Not sure why we even need weight at all?

pwolanin’s picture

FYI, 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'

pwolanin’s picture

@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.

jhodgdon’s picture

It seems like the change is reasonable.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x and 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.