Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
At the moment, site map sort items (spaces and sections) by NID. How to change to sort by Name or Weight?
Comment | File | Size | Author |
---|---|---|---|
#4 | oa_sitemap-sort-spaces-2682203-4.patch | 1.27 KB | JeffM2001 |
Comments
Comment #2
drvdt CreditAttribution: drvdt commentedAny help?
Comment #3
mpotter CreditAttribution: mpotter at Phase2 commentedYou'd need to submit a patch for that. Sorting by Weight is what we want. Right now only Sections have a weight. We'd need to add a Weight to Spaces. The original idea in the Site Map was to allow drag/drop re-ordering of Sections and Subspaces, which is why you'd want to sort by weight.
Until weight is added to spaces, sorting the subspaces by name is probably better than by nid. We basically want the Section and Subspace order in the Site Map to match what is given in the drop-down navigation menus.
Anyway, patches welcome.
Comment #4
JeffM2001 CreditAttribution: JeffM2001 commentedCoincidentally, I was just looking into this. Try out this patch. It appears to me that sections are already sorted by weight and then title, so this patch only deals with spaces.
Comment #5
mpotter CreditAttribution: mpotter at Phase2 commentedGood patch, thanks! Committed to b2689ed of oa_sitemap.
We can open a new issue for adding Weight to spaces in the future, but since that has a bigger impact I didn't want to hold up this simple improvement for it.