Posted on 29/04/2022 10:29:04
We cannot do that before we change the internals of how this works - and that is currently in slow progress (works on my machine)
- Use new URL provider to create sitemap XML - this has been made and is on its way.
- Change the navigation viewmodel setup so it will include all nodes in the tree with information about if it is folder, show in sitemap or something else
- Create a custom sitemap.xml.cshtml file that will filter out the pages that is not wanted
@1:
Will look like this:
It will not use the page tree to generate the sitemap. It will use the requesting domain to find all areas that fits to that domain, and then itereate the first 50.000 urls in those URL indexes and print it out. This only works if the new URL providers are used. Probably not perfect, but better.
@2:
There is a change to navigation system. So when using GetNavigation method, you can now pass in a setting on the navigation settings "IncludeFoldersAndHidden" that, when set to true, will return all nodes in the tree no matter what.
Then the NavigationTreeNodeViewModel has 3 new properties "ShowInMenu", "ShowInBreadcrumb" and "ShowInSitemap".
In a custom sitemap.xml.cshtml file the navigation system can be queried and you can do whatever you think is correct.
Thoughts?
BR Nicolai