in

dashCommerce

An ASP.NET Open Source e-Commerce Application

Change Colors for SUB Category Links in the Left Nav

Last post 07-02-2009 7:17 AM by invosoftben. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-11-2008 3:58 PM

    Change Colors for SUB Category Links in the Left Nav

    For anybody who would like to change the colors for Sub Category Links, you must do two things:

    1) Open the file at this location "Your_Installation_Directory/controls/navigation/categoryNavigation.ascx"

    Modify the lines as follows: 

    [Original Code] 

    <LevelMenuItemStyles>
        <asp:MenuItemStyle CssClass="categoryLevel1" />
        <asp:MenuItemStyle CssClass="categoryLevel1" />
        <asp:MenuItemStyle CssClass="categoryLevel1" />
        <asp:MenuItemStyle CssClass="categoryLevel1" />
    </LevelMenuItemStyles>

    [New Code]

    <LevelMenuItemStyles>
        <asp:MenuItemStyle CssClass="categoryLevel1" />
        <asp:MenuItemStyle CssClass="categoryLevel2" />
        <asp:MenuItemStyle CssClass="categoryLevel3" />
        <asp:MenuItemStyle CssClass="categoryLevel4" />
    </LevelMenuItemStyles>

     

    2) Open the main CSS file ( "Your_Installation_Directory/App_Themes/dashCommerce/site.css")

    Scroll down to about line 650 or do a search for  ".categoryLevel1"

    You will see different tag definitions for "categoryLevel1"

    Copy and Paste ALL of these declarations

    Change every NEW instance of "categoryLevel1" to "categoryLevel2"

    Do the same thing two more times for levels 3 and 4

    Change the styles for each Level according to your likeness. 

     

    Note: if you want Level 4 to share the same style as level 1, just specify it in the ascx file in step 1:

     <LevelMenuItemStyles>
        <asp:MenuItemStyle CssClass="categoryLevel1" />
        <asp:MenuItemStyle CssClass="categoryLevel2" />
        <asp:MenuItemStyle CssClass="categoryLevel3" />
        <asp:MenuItemStyle CssClass="categoryLevel1" />
    </LevelMenuItemStyles>

    Note 2: I have not tried this yet, but if you have more than 4 levels of Categories, you should be able to create a new line in the ascx file: 

    <LevelMenuItemStyles>
        <asp:MenuItemStyle CssClass="categoryLevel1" />
        <asp:MenuItemStyle CssClass="categoryLevel2" />
        <asp:MenuItemStyle CssClass="categoryLevel3" />
        <asp:MenuItemStyle CssClass="categoryLevel4" />
        <asp:MenuItemStyle CssClass="categoryLevel5" />
    </LevelMenuItemStyles>

  • 04-03-2009 5:28 AM In reply to

    Re: Change Colors for SUB Category Links in the Left Nav

    Hi,

     I have tried the approach in Note 2 as I need to show more than 4 levelvs of category menues.

     However, the category menu always show maximum of 4 levels.

    I also checked the xslt file but can not see where the 4 levels restriction comes from.

    Any ideas?

    Thanks

    Filed under: ,
  • 04-03-2009 6:12 PM In reply to

    Re: Change Colors for SUB Category Links in the Left Nav

     By default, the attribute MaximumDynamicDisplayLevels is 3, thus why you only get 4 levels (the first 'root' level is static).  So just set that property in the menu control, and you should be good.

     

    ~Ryan

  • 04-06-2009 6:52 AM In reply to

    Re: Change Colors for SUB Category Links in the Left Nav

    Thanks. That solved the problem.

  • 07-02-2009 7:17 AM In reply to

    Re: Change Colors for SUB Category Links in the Left Nav

    This just saved me some time digging around. Many Thanks
Page 1 of 1 (5 items)