public override void LoadSettings() { if (!IsPostBack) { FillForm(); var moduleSettings = new ContentBlocksModuleSettings(ModuleId); ViewContentLabel.Text = LocalizeString("NoneSelectedText"); if (!string.IsNullOrEmpty(moduleSettings.View)) { ViewComboBox.SelectedValue = moduleSettings.View; ViewContentLabel.Text = moduleSettings.View; } ContentBlocksValueLabel.Text = LocalizeString("NoneSelectedText"); if (!string.IsNullOrEmpty(moduleSettings.ContentBlockId)) { var contentBlocks = HccApp.ContentServices.Columns.Find(moduleSettings.ContentBlockId); ContentBlocksComboBox.SelectedValue = moduleSettings.ContentBlockId; ContentBlocksValueLabel.Text = contentBlocks.DisplayName; } ContentBlocksComboBox.Text = moduleSettings.ContentBlockId; } }
public override void UpdateSettings() { var moduleSettings = new ContentBlocksModuleSettings(ModuleId) { View = ViewComboBox.SelectedValue, ContentBlockId = ContentBlocksComboBox.SelectedValue }; }
protected override string RenderView() { var moduleSettings = new ContentBlocksModuleSettings(ModuleId); if (!string.IsNullOrEmpty(moduleSettings.ContentBlockId)) { return(MvcRenderingEngine.Render("ContentColumn", "Index", new { id = moduleSettings.ContentBlockId })); } return(string.Empty); }