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.
Even though most sites wont allow users to select if their profile will be included in the sitemap or not, it should still be possible to manually control its display in the Manage Fields/Display settings in the Account Settings.
Right now it has a habit of randomly ending up anywhere when I try to get a nice order for a site I am working on.
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedYou would have to allow anonymous access to the user profile, is that what you want? Only the links with anonymous access can be included in the sitemap.xml file.
Comment #2
tsvenson CreditAttribution: tsvenson commentedNo, I just want to be able to control where it is displayed for user that has the permission to change that setting when editing their account.
For example, I added two new fields, first and last name, that I want to be at the top of the edit profile page. The problem is that the XML sitemap field prevents this and shows as field 2. Thus, the result is:
First name:
XML Sitemap settings
Last name:
That is not very good looking.
There is no way I can change this without manually fiddling in the db I think.
I also like the Field Groups module and would like to put settings like this in its own tab, but since its not available as a arrangeable field, that is impossible too.
Comment #3
Dave ReidYeah, I get what you mean. :)
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedI've not played with D7 enough to know yet but there should be a method to control the #weight of the form fields. Oh, yea, create a custom module and use hook_form_alter (or maybe hook_form) to alter the #weight for the fields on the form. You'll run into this type of issue with other modules you might use as well. Since you're able to control the #weight placement via a custom module I'm setting this to (won't fix). If you find that your custom module doesn't control it then come back here and mark it active.
Comment #5
tsvenson CreditAttribution: tsvenson commented@earnie: Sorry, I'm not a coder. If I was I would have provided a patch for it. To be honest that kind of stuff should be standard in the modules that provide these kind of settings. That the problem exists in other modules is unrelated.
@Dave Reid: Any chance this might make it into a future version?
Comment #6
Dave ReidYeah I actually am just about to commit it. :) It's super easy and nice to support from the module-side so that people don't have to write custom form alters in order to move them. This is why hook_field_extra_fields() exists in D7.
Comment #7
tsvenson CreditAttribution: tsvenson commentedNice one Dave. Thanks for a quick fix. Hope it will be fixed in Drupal Core as well. Same thing is missing for several fields there and I filed issues for them too :)
Comment #8
Dave ReidFixed in Git with http://drupalcode.org/project/xmlsitemap.git/commit/ee9f7ed