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.
Not sure if this is a sitemap or a menuviews issue, but the sitemap displays the complete menu views, not just the links.
Comment | File | Size | Author |
---|---|---|---|
#6 | menu_views-xmlsitemap_support-1478788-6.patch | 1.38 KB | ron_s |
Comments
Comment #1
markhalliwellI believe this should be fixed in the 2.x branch. Please let me know if it fixes it. Thanks!
Comment #2
FranCarstens CreditAttribution: FranCarstens commentedNot sure which sitemap is referred to, but I'm not getting any display in sitemap-xml. Is there a way to do this?
Comment #3
rwinikates CreditAttribution: rwinikates commentedLikewise, running menu views 2.1 and xml sitemap 2.0-rc2 and my xml sitemap generates this:
Comment #4
BBCSame is true for the Site Map Module, which might be what the original commenter was referring to.
Example output is:
Comment #5
GaëlGFor the sitemap module, you can try this:
Comment #6
ron_s CreditAttribution: ron_s commentedRegarding XML Sitemap, there is no option available with Menu Views to configure settings per menu item. This leads to incorrect results in sitemap.xml as @rwinikates mentioned in #2. We were seeing entries in our sitemap of "http://domain.com/%3Cview%3E".
To fix this, we took an approach similar to the Special Menu Items (https://www.drupal.org/project/special_menu_items) module. Special Menu Items stores non-standard menu links, such as
<hr>
separators. If XML Sitemap is marked as "included" for the menu item, it leads to sitemap entries of "http://domain.com/%3Chr%3E". The way to fix this is exclude XML Sitemap settings for each Special Menu Item. Excluding the separators removes the improper sitemap entries.This option is not possible with Menu Views since the module clears out all supporting fieldsets except Menu Item Settings. To allow us to control XML Sitemap values on menu items with Views, we've created a patch that sets the XML Sitemap's #weight appropriately, and skips $child entries of 'xmlsitemap' when they exist.
Not sure if this is the best way to accomplish this, but it certainly works.
Comment #8
markhalliwell