0
我試圖在已經應用了一些設置的ContainerPart的遷移中創建新的內容類型。ContainerPart在新類型上的設置
ContentDefinitionManager.AlterTypeDefinition("NewType",
cfg => cfg
.DisplayedAs("New Type")
.WithPart(typeof(TitlePart).Name)
.WithPart(typeof(ContainerPart).Name)
.WithSetting("ContainerPartSettings.ItemsShownDefault", "False")
.WithPart(typeof(CommonPart).Name)
.WithPart(typeof(IdentityPart).Name)
.Creatable()
.Listable()
);
ItemsShown默認情況下,遷移後,保持其默認值爲True。
我試過的這幾個不同的版本:
重命名 「ContainerPartSettings」 到其他版本一樣ContainerSettings,ContainerTypePartSettings
不使用的typeof()函數並指定與零件直接字符串
從我所知道的,ContainerSettings使用不同的方法來存儲它的值比較給其他人如AutorouteSettings。在你的代碼