Ejemplo n.º 1
0
        protected override void OnInit(EventArgs e)
        {
            ModCtrl   = new NBrightBuyController();
            DebugMode = StoreSettings.Current.DebugMode;

            base.OnInit(e);

            #region "Get all Settings for module"
            //get Model Level Settings
            ModSettings = new ModSettings(ModuleId, Settings);
            ModuleKey   = ModSettings.Get("modref");
            if (String.IsNullOrEmpty(ModuleKey))
            {
                ModuleKey = ModSettings.Get("modulekey");                                  // keep backward compatiblity with NBS_ProductView.
            }
            #endregion

            if (EnablePaging)
            {
                // SET NOINDEX if we are paging product list
                try
                {
                    var page = Utils.RequestQueryStringParam(Context, "page");
                    if (page != "")
                    {
                        var metarobots = (System.Web.UI.HtmlControls.HtmlMeta)BasePage.Header.FindControl("MetaRobots");
                        if (metarobots != null)
                        {
                            metarobots.Content = "NOINDEX";
                        }
                    }
                }
                catch (Exception)
                {
                    //ignore
                }

                CtrlPaging = new NBrightCore.controls.PagingCtrl();
                this.Controls.Add(CtrlPaging);
                CtrlPaging.PageChanged += new RepeaterCommandEventHandler(PagingClick);
            }

            //add template provider to NBright Templating
            NBrightCore.providers.GenXProviderManager.AddProvider("NBrightBuy,Nevoweb.DNN.NBrightBuy.render.GenXmlTemplateExt");

            // search for any other NBright Tenmplating providers that might have been added.
            var pluginData = new PluginData(PortalSettings.Current.PortalId);
            var l          = pluginData.GetTemplateExtProviders();
            foreach (var p in l)
            {
                var prov = p.Value;
                NBrightCore.providers.GenXProviderManager.AddProvider(prov.GetXmlProperty("genxml/textbox/assembly") + "," + prov.GetXmlProperty("genxml/textbox/namespaceclass"));
            }
        }
Ejemplo n.º 2
0
        protected override void OnInit(EventArgs e)
        {
            ModCtrl   = new NBrightBuyController();
            DebugMode = StoreSettings.Current.DebugMode;

            base.OnInit(e);

            #region "Get all Settings for module"
            //get Model Level Settings
            ModSettings = new ModSettings(ModuleId, Settings);
            ModuleKey   = ModSettings.Get("modref");
            if (String.IsNullOrEmpty(ModuleKey))
            {
                ModuleKey = ModSettings.Get("modulekey");                                  // keep backward compatiblity with NBS_ProductView.
            }
            #endregion

            if (EnablePaging)
            {
                CtrlPaging = new NBrightCore.controls.PagingCtrl();
                this.Controls.Add(CtrlPaging);
                CtrlPaging.PageChanged += new RepeaterCommandEventHandler(PagingClick);
            }

            //add template provider to NBright Templating
            NBrightCore.providers.GenXProviderManager.AddProvider("NBrightBuy,Nevoweb.DNN.NBrightBuy.render.GenXmlTemplateExt");

            // search for any other NBright Tenmplating providers that might have been added.
            var pluginData = new PluginData(PortalSettings.Current.PortalId);
            var l          = pluginData.GetTemplateExtProviders();
            foreach (var p in l)
            {
                var prov = p.Value;
                NBrightCore.providers.GenXProviderManager.AddProvider(prov.GetXmlProperty("genxml/textbox/assembly") + "," + prov.GetXmlProperty("genxml/textbox/namespaceclass"));
            }
        }