private void BindLayouts()
        {
            _Layouts = LayoutDataSource.LoadAll();

            LayoutsGrid.DataBind();

            // INIT DEFAULTS
            StoreSettingsManager settings = AbleContext.Current.Store.Settings;

            WebpagesDefault.DataSource = _Layouts;
            WebpagesDefault.DataBind();
            if (!string.IsNullOrEmpty(settings.WebpagesDefaultLayout))
            {
                SelectItem(WebpagesDefault, settings.WebpagesDefaultLayout);
            }

            CategoriesDefault.DataSource = _Layouts;
            CategoriesDefault.DataBind();
            if (!string.IsNullOrEmpty(settings.CategoriesDefaultLayout))
            {
                SelectItem(CategoriesDefault, settings.CategoriesDefaultLayout);
            }

            ProductsDefault.DataSource = _Layouts;
            ProductsDefault.DataBind();
            if (!string.IsNullOrEmpty(settings.ProductsDefaultLayout))
            {
                SelectItem(ProductsDefault, settings.ProductsDefaultLayout);
            }
        }
Beispiel #2
0
        protected void BindDisplayPage()
        {
            CategoriesDefault.DataSource = WebpageDataSource.LoadForWebpageType(WebpageType.CategoryDisplay);
            CategoriesDefault.DataBind();
            ListItem selectedItem = null;

            selectedItem = CategoriesDefault.Items.FindByValue(_Settings.CategoryWebpageId.ToString());
            if (selectedItem != null)
            {
                CategoriesDefault.SelectedIndex = CategoriesDefault.Items.IndexOf(selectedItem);
            }
        }