- Issue created by @thomaswalther
- πΊπΈUnited States trackleft2 Tucson, AZ πΊπΈ
Are you not able to use the API?
https://git.drupalcode.org/project/xmlsitemap/-/blob/2.x/xmlsitemap.api....
I want a created node to be excluded programmatically in the XML sitemap for the 8.x version.
So this does not work anymore: https://www.drupal.org/project/xmlsitemap/issues/2355451 β
$node = Node::create([
'type' => 'mytype',
'title' => 'test',
'uid' => 1
]);
$node->save();
Maybe it's relevant, I made also a menu link for this node:
$menulink = MenuLinkContent::create([
'title' => $node->getTitle(),
'link' => [
'uri' => "entity:node/".$node->id(),
],
'menu_name' => 'main',
'weight' => 10,
])->save();
How now to exclude the $node or the $menulink?
Active
1.5
Documentation
Are you not able to use the API?
https://git.drupalcode.org/project/xmlsitemap/-/blob/2.x/xmlsitemap.api....