protected override DriverResult Editor(CommonPart part, IUpdateModel updater, dynamic shapeHelper) { var model = new ContentPickerCreationWindowVM(); updater.TryUpdateModel(model, Prefix, null, null); return(ContentShape("Parts_ContentPickerCreateItem_EditExtension", () => shapeHelper.EditorTemplate(TemplateName: "Parts/ContentPickerCreateItem.EditExtension", Model: model, Prefix: Prefix))); }
protected override DriverResult Editor(CommonPart part, dynamic shapeHelper) { var model = new ContentPickerCreationWindowVM { IdContent = part.ContentItem.Id, Published = part.ContentItem.IsPublished(), TypeContent = part.ContentItem.ContentType }; TitlePart titlePart = part.ContentItem.As <TitlePart>(); if (titlePart != null && !string.IsNullOrWhiteSpace(titlePart.Title)) { model.TitleContent = titlePart.Title; } return(ContentShape("Parts_ContentPickerCreateItem_EditExtension", () => shapeHelper.EditorTemplate(TemplateName: "Parts/ContentPickerCreateItem.EditExtension", Model: model, Prefix: Prefix))); }