Пример #1
0
        public override IEnumerable<TemplateViewModel> TypeEditorUpdate(ContentTypeDefinitionBuilder builder, IUpdateModel updateModel)
        {
            var model = new DynamicTypeSettingsViewModel();
            updateModel.TryUpdateModel(model, "DynamicTypeSettingsViewModel", null, null);

            builder.WithSetting("DynamicTypeSettings.IsDeployed", model.IsDeployed.ToString());

            yield return DefinitionTemplate(model);
        }
Пример #2
0
        public override IEnumerable<TemplateViewModel> TypeEditor(ContentTypeDefinition definition)
        {
            var settings = definition.Settings.GetModel<DynamicTypeSettings>();
            var model = new DynamicTypeSettingsViewModel
            {
                IsDeployed = settings.IsDeployed
            };

            yield return DefinitionTemplate(model);
        }