Adding description to categorygridpage

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
Chris Hadden
Commander (CMDR)
Commander (CMDR)
Posts: 182
Joined: Tue Jan 27, 2009 2:29 pm

Adding description to categorygridpage

Post by Chris Hadden » Wed Jun 10, 2015 8:26 am

I want to have category description displayed above the products when using categorygridpage. Can someone explain how to do that?

Thanks
Chris

rmaweb
Commander (CMDR)
Commander (CMDR)
Posts: 118
Joined: Fri Sep 10, 2010 9:41 am

Re: Adding description to categorygridpage

Post by rmaweb » Wed Jun 10, 2015 9:30 am

Hello Chris,

If you are using Able Gold R10, all you have to do is go to Admin -> Website -> Category Pages and click on the category display page you want to edit, and make it look similar to:

[[ConLib:CategoryGridPage Cols="3" PagingLinksLocation="BOTTOM" DisplayBreadCrumbs="True" DefaultCaption="Catalog" ShowSummary="False" ShowDescription="True"]]

If you are using a Gold version that is < R10, then you would have to do the following:

Open Website/ConLib/CategoryGridPage.ascx

Find:

Code: Select all

<asp:PlaceHolder ID="CategoryHeaderPanel" runat="server" EnableViewState="false"></asp:PlaceHolder>
Add After:

Code: Select all

    <asp:PlaceHolder ID="CategoryDescriptionPanel" runat="server" EnableViewState="false">
        <div class="section">
            <div class="content">
                <asp:Literal ID="CategoryDescription" runat="server" Text="" EnableViewState="false" />
            </div>
        </div>
    </asp:PlaceHolder>
Open Website/ConLib/CategoryGridPage.ascx.cs

Find:

Code: Select all

        public string DefaultCaption
        {
            get { return _DefaultCaption; }
            set { _DefaultCaption = value; }
        }
Add After:

Code: Select all

        private bool _showDescription = false;
        /// <summary>
        /// Indicates wheather the description should be displayed or not, default value is false
        /// </summary>
        [Personalizable(), WebBrowsable()]
        [Browsable(true), DefaultValue(false)]
        [Description("Indicates wheather the description should be displayed or not, default value is false.")]
        public bool ShowDescription
        {
            get { return _showDescription; }
            set { _showDescription = value; }
        }
Find:

Code: Select all

                if (_category != null)
                {
                    Caption.Text = _category.Name;
Add After:

Code: Select all

                    if (!string.IsNullOrEmpty(_category.Description) && ShowDescription)
                    {
                        CategoryDescriptionPanel.Visible = true;
                        CategoryDescription.Text = _category.Description;
                    }
                    else
                        CategoryDescriptionPanel.Visible = false;
Ryan A.
Scott's Bait and Tackle
http://store.scottsbt.com
Work In Progress
Able Gold R10
Bootstrap 3.3

Chris Hadden
Commander (CMDR)
Commander (CMDR)
Posts: 182
Joined: Tue Jan 27, 2009 2:29 pm

Re: Adding description to categorygridpage

Post by Chris Hadden » Wed Jun 10, 2015 9:50 am

I am using gold 10, that worked great thanks

Post Reply