Score:0

How do I add new fields to the sitemap.xml file generated by the XML Sitemap module?

mp flag

Is there a way to add extra fields to the sitemap.xml file created by the XML Sitemap module?

By default, it has these fields: URL, last modification date, change frequency, and priority. I'd like to add language, as I'd like to have one sitemap.xml file and not one file per language.

id flag
Does this answer your question? [How can my module add xml sitemap entries?](https://drupal.stackexchange.com/questions/16627/how-can-my-module-add-xml-sitemap-entries)
id flag
Have you looked into its API? https://git.drupalcode.org/project/xmlsitemap/-/blob/7.x-2.x/xmlsitemap.api.php?ref_type=heads
monster_energy avatar
mp flag
@cilefen - all links in the question you linked go to some site that seems to sell steroids or something like that :(
monster_energy avatar
mp flag
@cilefen - thank you, I am reading through the API. Still not sure how to use it though
id flag
It is a very old answer but I think little has changed about the API. Fortunately the link I provided above contains the entire API.
Nikit avatar
sk flag
You can use views + any xml output modulke instead of xmlsitemap
monster_energy avatar
mp flag
@Nikit - Thank you. Any links you can share that can explain your strategy?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.