T
T
Taras Labiak2015-01-14 15:02:02
Drupal
Taras Labiak, 2015-01-14 15:02:02

How to generate sitemap automatically when adding material in Drupal?

How to generate sitemap.xml automatically every time content is added in Drupal? Can this be done only selectively for certain types of materials?
The module https://www.drupal.org/project/xmlsitemap is used

Answer the question

In order to leave comments, you need to log in

2 answer(s)
U
UksusoFF, 2015-01-14
@UksusoFF

In the settings there is:

Minimum sitemap lifetime
The minimum amount of time that will elapse before the sitemaps are regenerated. The sitemaps will also only be regenerated on cron if any links have been added, updated, or deleted.
Recommended value: @count day.

A
andead, 2015-01-15
@andead

function modulename_node_insert() {
  module_load_include('generate.inc', 'xmlsitemap');
  xmlsitemap_run_unprogressive_batch('xmlsitemap_regenerate_batch');
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question