I have tried using code from CategoryGridPage4 and code from this forum post: viewtopic.php?f=42&t=17583&p=75683 but neither option has worked.
I receive the error:
[[ConLib:CategoryGridPage]] CategoryGridPage.ascx.cs(100): error CS0103: The name '_Category' does not exist in the current context
I've tried several different variations and nothing works.
I am not a programmer. Could someone point me in the right direction?
Right now the code behind file contains:
Code: Select all
private void BindPage()
{
//BIND THE DISPLAY ELEMENTS
if (IsValidCategory())
{
CategoryBreadCrumbs1.Visible = DisplayBreadCrumbs;
CategoryBreadCrumbs1.CategoryId = this._categoryId;
if (_category != null)
{
Page.Title = string.IsNullOrEmpty(_category.Title) ? _category.Name : _category.Title;
Caption.Text = _category.Name;
//Added for category description
if (!string.IsNullOrEmpty(_Category.Description))
{
CategoryDescriptionPanel.Visible = true;
CategoryDescription.Text = _Category.Description;
}
else CategoryDescriptionPanel.Visible = false;
//END category description
}
else
{
// IF IT IS ROOT CATEGORY
Page.Title = DefaultCaption;
Caption.Text = DefaultCaption;
}
BindSubCategories();
}
else
{
CategoryHeaderPanel.Visible = false;
}
BindSearchResultsPanel();
}