public override IEnumerable<TemplateViewModel> PartEditorUpdate(ContentPartDefinitionBuilder builder, IUpdateModel updateModel) { if (builder.Name != "ContainerPart") yield break; var model = new ContainerPartSettings(); updateModel.TryUpdateModel(model, "ContainerPartSettings", null, null); builder.WithSetting("ContainerPartSettings.PageSizeDefault", model.PageSizeDefault.ToString()); builder.WithSetting("ContainerPartSettings.PaginatedDefault", model.PaginatedDefault.ToString()); yield return DefinitionTemplate(model); }
public override IEnumerable <TemplateViewModel> PartEditorUpdate(ContentPartDefinitionBuilder builder, IUpdateModel updateModel) { if (builder.Name != "ContainerPart") { yield break; } var model = new ContainerPartSettings(); updateModel.TryUpdateModel(model, "ContainerPartSettings", null, null); builder.WithSetting("ContainerPartSettings.PageSizeDefault", model.PageSizeDefault.ToString()); builder.WithSetting("ContainerPartSettings.PaginatedDefault", model.PaginatedDefault.ToString()); yield return(DefinitionTemplate(model)); }