Show categories horizontally with dropdown for sub categories

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 14 años
Hi AntonL, my menu is working in IE 7, but in IE 6 menus are distracted. This is because of some of menu.css class which is not supported in IE 6.

I am also working on it. Update soon.

Thanks
Venkat
Hace 14 años
now my menu works in ie6!
Hace 14 años
The parent menu shows up in IE8 however the child menus are not. I'm using 1.50. Please advise. Thanks!
Hace 14 años
This dynamic category navigation is in use at www.tire.biz when you click on "Vehicles".

I did it using the following DataList code:

                            <div id="submenuVehicles" class="anylinkcsscols">
                                <div class="column" id="columnVehicle">
                                    <b>Vehicle Makes</b>
                                    <asp:DataList ID="dlVehicleSubCategories" runat="server" RepeatColumns="4" RepeatDirection="Vertical"
                                        RepeatLayout="Table" OnItemDataBound="dlVehicleSubCategories_ItemDataBound">
                                        <ItemTemplate>
                                            <asp:HyperLink ID="hlCategory" runat="server" />
                                        </ItemTemplate>
                                    </asp:DataList>
                                </div>
                            </div>

This relies on the anylinkcss menuing javascript library - Get it here

and the following codebehind

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using NopSolutions.NopCommerce.BusinessLogic;
using NopSolutions.NopCommerce.BusinessLogic.Categories;
using NopSolutions.NopCommerce.BusinessLogic.SEO;
using NopSolutions.NopCommerce.Common.Utils;

namespace NopSolutions.NopCommerce.Web.Modules
{
    public partial class MenuLeft : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                BindData();
            }
        }
        protected void BindData()
        {
            int VehicleCategoryID = 7;
            var vehicleCategoryCollection = CategoryManager.GetAllCategories(VehicleCategoryID);
            if (vehicleCategoryCollection.Count > 0)
            {
                dlVehicleSubCategories.DataSource = vehicleCategoryCollection;
                dlVehicleSubCategories.DataBind();
            }
            else
                dlVehicleSubCategories.Visible = false;
        }

        protected void dlVehicleSubCategories_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var category = e.Item.DataItem as Category;
                string categoryURL = SEOHelper.GetCategoryURL(category.CategoryID);
                var hlCategory = e.Item.FindControl("hlCategory") as HyperLink;
                if (hlCategory != null)
                {
                    hlCategory.NavigateUrl = categoryURL;
                    hlCategory.Text = Server.HtmlEncode(category.Name);
                }
            }
        }
    }
}


I hope that's helpful to you.

Jared Nielsen
www.FUZION.org
Hace 14 años
phlat wrote:
The parent menu shows up in IE8 however the child menus are not. I'm using 1.50. Please advise. Thanks!


I found a work around for this, if it helps anyone having the same issue.


Right after the head tag open in Root master place this line:

<!-- Use IE7 mode -->
  <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
Hace 14 años
I couldnt make it work, is there anything I should add or change?

Thank u
Hace 14 años
I'm sorry but does anybody have a working sample of this?
Hace 14 años
anyone?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.