Example #1
0
        private void RazorPageLoad()
        {
            NBrightInfo objCat = null;

            if (RazorTemplate.Trim() != "")  // if we don;t have a template, don't do anything
            {
                if (_displayentrypage)
                {
                    // get correct itemid, based on eid given
                    _eid = GetEntryIdFromName(_eid);
                    RazorDisplayDataEntry(_eid);
                }
                else
                {
                    // load meta data for category
                    if (Utils.IsNumeric(_catid))
                    {
                        var catData = new CategoryData(_catid, Utils.GetCurrentCulture());
                        if (catData.Name != null)
                        {
                            if (catData.SEOTitle != "")
                            {
                                BasePage.Title = catData.SEOTitle;
                            }
                            else
                            {
                                BasePage.Title = catData.SEOName;
                            }

                            if (BasePage.Title == "")
                            {
                                BasePage.Title = catData.Name;
                            }

                            if (catData.SEODescription != "")
                            {
                                BasePage.Description = catData.SEODescription;
                            }
                            if (catData.SEOTagwords != "")
                            {
                                BasePage.KeyWords = catData.SEOTagwords;
                            }
                        }
                    }

                    var pf     = new ProductFunctions();
                    var strOut = pf.ProductAjaxViewList(Context, ModuleId, TabId, true);

                    // load base template which should call ajax and load the list.
                    //var strOut = NBrightBuyUtils.RazorTemplRender(RazorTemplate, ModuleId, "productdetailrazor" + ModuleId, new NBrightInfo(true), _controlPath, ModSettings.ThemeFolder, Utils.GetCurrentCulture(), ModSettings.Settings());

                    var lit = new Literal();
                    lit.Text = strOut;
                    phData.Controls.Add(lit);
                }
            }
        }
        private void RazorPageLoad()
        {
            NBrightInfo objCat = null;

            if (RazorTemplate.Trim() != "")  // if we don;t have a template, don't do anything
            {
                if (_displayentrypage)
                {
                    // get correct itemid, based on eid given
                    _eid = GetEntryIdFromName(_eid);
                    RazorDisplayDataEntry(_eid);
                }
                else
                {
                    // load base template which should call ajax and load the list.
                    var strOut = NBrightBuyUtils.RazorTemplRender(RazorTemplate, ModuleId, "productdetailrazor" + ModuleId, new NBrightInfo(true), _controlPath, ModSettings.ThemeFolder, Utils.GetCurrentCulture(), ModSettings.Settings());
                    var lit    = new Literal();
                    lit.Text = strOut;
                    phData.Controls.Add(lit);
                }
            }
        }