Apply a new css class on Product Subcategories Menu

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi all,

I'd like to apply an extra css class on subcategory menu items. I tried to edit the CategoryNavigation.ascx.cs file but it seems that my actions have no result at all.

I made the following changes:

(line 49)
                if (!String.IsNullOrEmpty(this.LiLeftMargin))
                {
                    writer.WriteAttribute("style", string.Format("margin-left: {0}px", this.LiLeftMargin));
                    writer.WriteAttribute("class", "subcat");
                }


Nothing happens though, as if I hadn't change the code at all. Am I doing something wrong here?
Please help...
13 years ago
did you recompile the solution after you made the changes ?
13 years ago
I edit files locally, recompile CategoryNavigation.ascx.cs and then upload it on server. Do I have to do something more?
13 years ago
You also need to upload \bin\NopCommerceStore.dll assembly to your server
13 years ago
There is no "NopCommerceStore.dll" in /bin directory...

(Thank you for your answer and excuse me for my ignorance. I'm really new to nopcommerce and visual webdeveloper)
13 years ago
(edit)
I finally managed to update files.

I 'm looking for some way to customize code and create a tree-type category list.
The subcategies should not be at the same level of the list with the parent categories.
This is wrong, in my personal opinion.
The code should create a category list like this:

<ul>
  <li>
      Parent Category 1
        <ul>
            <li>Subcategory item 1</li>
            <li>Subcategory item 2</li>
            <li>Subcategory item 3</li>
            <li>Subcategory item 4</li>
        </ul>
    </li>
    <li>
      Parent Category 2
    </li>
    <li>
      Parent Category 3
    </li>
</ul>


Is this possible? Can you help me fix this please?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.