At the moment, site map sort items (spaces and sections) by NID. How to change to sort by Name or Weight?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drvdt created an issue. See original summary.

drvdt’s picture

Any help?

mpotter’s picture

You'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.

JeffM2001’s picture

Coincidentally, 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.

mpotter’s picture

Status: Active » Fixed

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

Status: Fixed » Closed (fixed)

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