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.
Add field to configure attributes for root element, so it is possible to configure XML like this:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
<!-- rows -->
</urlset>
Comments
Comment #2
philsward CreditAttribution: philsward commentedI'll +1 this. Need something similar for google shopping. Otherwise you have to muck with the template file.
My recommendation is to make it a generic text field to allow "any" attribute. For example, google shopping doesn't require a urlset:
Comment #3
Shiraz Dindarwell it's 2 years later but I'm +1'ing this too. The root node would setting as it is now would work fine for this if it wasn't run through _views_data_export_xml_tag_clean, so it would be pretty easy option to add beside it, like a "leave root node unfiltered" checkbox.
As it is now, it's the view header template you want to edit, for anyone looking.
Comment #4
stefan.butura CreditAttribution: stefan.butura commentedThis worked for me: