Commit acdc063d authored by gbyte.co's avatar gbyte.co

Add entity id and type to link array passed to sitemap generator in order to...

Add entity id and type to link array passed to sitemap generator in order to make link alter hook more usable
parent bea638ae
......@@ -222,7 +222,8 @@ class Batch {
$context['results']['generate'][] = [
'path' => $path,
'urls' => $urls,
// 'options' => $url_object->getOptions(),
'entity_info' => ['entity_type' => $entity_info['entity_type_name'], 'id' => $entity_id],
// 'options' => $url_object->getOptions(), // Not needed, removed to save resources
'lastmod' => method_exists($entity, 'getChangedTime') ? date_iso8601($entity->getChangedTime()) : NULL,
'priority' => isset($priority) ? $priority : (isset($entity_info['bundle_settings']['priority']) ? $entity_info['bundle_settings']['priority'] : NULL),
];
......@@ -288,7 +289,7 @@ class Batch {
$context['results']['generate'][] = [
'path' => $path,
'urls' => $urls,
// 'options' => $url_object->getOptions(),
// 'options' => $url_object->getOptions(), // Not needed, removed to save resources
'priority' => isset($custom_path['priority']) ? $custom_path['priority'] : NULL,
];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment