我有一个为查询表单开发的自定义内容项,具有以下迁移
ContentDefinitionManager.AlterTypeDefinition("Bt Enquiry Page", cfg => cfg
.WithPart("TitlePart")
.WithPart("AutoroutePart")
.WithPart("AutoroutePart", builder => builder
.WithSetting("AutorouteSettings.AllowCustomPattern", "true")
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "false")
.WithSetting("AutorouteSettings.PatternDefinitions", "[{Name:'Title', Pattern: '{Content.Slug}', Description: 'my-page'}]")
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
.WithPart("MenuPart")
.WithPart("TagPart")
.WithPart("BodyPart")
.WithPart("CommonPart")
.WithPart("EnquirySettingPart")
.Creatable()
.Indexed()
);
出于某种原因,当我禁用模块功能时,自定义内容项“Bt 查询页面”不会从管理菜单中消失,这意味着即使该功能被禁用,我也可以创建内容项的实例。这是默认行为吗?我错过了什么吗,任何人都可以点亮一些灯。
-乔治