I am creating a custom part where, in the settings for that part, depending on a value the user selects from the dropdown, the system attaches a certain (other) part to the content type that the custom part is on.
TypePartEditorUpdate(ContentTypePartDefinitionBuilder builder, IUpdateModel updateModel)
method of my settings class, I am calling:
_definitionManager.AlterTypeDefinition("GroupsUserContent", bld => bld.WithPart("GroupsUserContent"));
(_definitionManager is an instance of IContentTypeDefinitionManager, the names are strings for simplicity here, but will be variable)
Its not working. The part is not attached to the type. Nothing is added to the database in the 'Settings_ContentTypePartDefinitionRecord' table.
The names of the types/parts definately exist. I can call the
exact same line of code from the modules Migrations.cs file and it works as expected.
Anyone have any clues as to why this isn't working?