Example #1
0
        protected void Page_Init(object sender, EventArgs e)
        {
            _categoryId = AbleCommerce.Code.PageHelper.GetCategoryId();
            _category   = CategoryDataSource.Load(this._categoryId);
            if (_category != null)
            {
                if ((_category.Visibility == CatalogVisibility.Private) &&
                    (!AbleContext.Current.User.IsInRole(Role.CatalogAdminRoles)))
                {
                    Response.Redirect(NavigationHelper.GetMobileStoreUrl("default.sapx"));
                }
            }
            else
            {
                NavigationHelper.Trigger404(Response, "Invalid Category");
            }

            //REGISTER THE PAGEVISIT
            PageVisitHelper.RegisterPageVisit(_category.Id, CatalogNodeType.Category, _category.Name);
            PageHelper.BindMetaTags(this, _category);
        }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (_Link != null)
     {
         //REGISTER THE PAGEVISIT
         PageVisitHelper.RegisterPageVisit(_Link.Id, CatalogNodeType.Link, _Link.Name);
         AbleCommerce.Code.PageHelper.BindMetaTags(this, _Link);
         Page.Title    = _Link.Name;
         LinkName.Text = _Link.Name;
         if (!string.IsNullOrEmpty(_Link.Description))
         {
             LinkDescriptionPanel.Visible = true;
             LinkDescription.Text         = _Link.Description;
         }
         else
         {
             LinkDescriptionPanel.Visible = false;
         }
         LinkTarget.NavigateUrl = _Link.TargetUrl;
         LinkTarget.Text        = _Link.TargetUrl;
         LinkTarget.Target      = _Link.TargetWindow;
     }
 }