Close

How to add an additional drop down menu?

pdesignz
12 years ago
#1429 Quote
Avatar
  • 40
How can I add an additional drop down menu,  like the drop down for the categories section. This would be links separate from categories, but would like to resemble the look of the drop down menu.

Thanks
IvanStoyanov
12 years ago
#1430 Quote
Avatar
  • 269
pdesignz wrote:
How can I add an additional drop down menu,  like the drop down for the categories section. This would be links separate from categories, but would like to resemble the look of the drop down menu.

Thanks


Hi pdesignz,

To add additional drop down menu to your Categories Header Menu plugin go to /Plugins/SevenSpikes.Nop.Plugins.CategoriesHeaderMenu/Views/CategoriesHeaderMenu and open CategoriesHeaderMenu.cshtml view.

In the view you can add additional drop down menu like this:

  @if (Model.ShowManufacturers)
        {
            <li><a href="@Url.RouteUrl("ManufacturerList")">@T("Manufacturers")</a>
                <ul>
                    @Html.Raw(Model.ManufacturersHtml)
                </ul>
            </li>
        }
        @* Put your additional drop down here *@
        <li><a href="#">My additional drop down</a>
            <ul>
                <li><a href="#">Drop down Item 1</a></li>
                <li><a href="#">Drop down item 2</a></li>
            </ul>
        </li>
Thank you for choosing our products! Your feedback is important to us!
pdesignz
12 years ago
#1431 Quote
Avatar
  • 40
If I have a custom link that is not Manufacturers, how would I do this. For example, I have a category that I created (Must Have's). This is a parent category to 3 sub categories of that section. Being a category, this already displays in the category drop down. This is a category that I want to focus on and promote, so I would like to have this as a top level menu, with the three sub categories be part of the drop down for this section.

Thanks
Boyko
12 years ago
#1432 Quote
Avatar
  • 1570
pdesignz wrote:
If I have a custom link that is not Manufacturers, how would I do this. For example, I have a category that I created (Must Have's). This is a parent category to 3 sub categories of that section. Being a category, this already displays in the category drop down. This is a category that I want to focus on and promote, so I would like to have this as a top level menu, with the three sub categories be part of the drop down for this section.

Thanks


Hi pdesignz,

What you want is not possible out of the box. You need to hardcode your category and its subcategory links in the menu as described above. But if your category structure changes you need to change it too.

Thanks
Regards,
Nop-Templates.com Team
pdesignz
12 years ago
#1434 Quote
Avatar
  • 40
As I am not familiar with MVC,

Where do I get Model.ShowManufacturers and can I add a custom name here

Where do I get, ManufacturerList, Manufacturers and ManufacturersHtml

I am trying to understand, so I can see about a custom section and links.

Thanks!
Boyko
12 years ago
#1435 Quote
Avatar
  • 1570
pdesignz wrote:
As I am not familiar with MVC,

Where do I get Model.ShowManufacturers and can I add a custom name here

Where do I get, ManufacturerList, Manufacturers and ManufacturersHtml

I am trying to understand, so I can see about a custom section and links.

Thanks!


Hi pdesignz,

You can't change the Model as it is created in the Controller of the plugin.
In the view you can only consume the data in the model.
There are nice videos about MVC. We highly recommend you watching them first:
http://www.asp.net/mvc/videos/mvc-3

Thanks
Regards,
Nop-Templates.com Team