Hello,
for me it's nor working right at Kentico 9.0.23, but you can use custom handler, for example:
using CMS.Base;
[DocumentHandler]
public partial class CMSModuleLoader
{
public class DocumentHandler : CMSLoaderAttribute
{
public override void Init()
{
CMS.DocumentEngine.DocumentEvents.Insert.Before += Document_Insert_Before;
}
private void Document_Insert_Before(object sender, CMS.DocumentEngine.DocumentEventArgs e)
{
var doc = e.Node;
if (doc == null) return;
if (doc.ClassName.ToLowerCSafe()=="yourPageTypeClassName")
{
doc.SetValue("DocumentShowInSiteMap", false);
doc.SetValue("DocumentMenuItemHideInNavigation", false);
}
}
}
}