Close

How to add additional items to menu

iliyan.tanev
9 years ago
#9867 Quote
Avatar
  • 347
Hi,

By different cart do you mean different store ?
Regards,
Iliyan Tanev
Nop-Templates Dev Team
cbaldo
9 years ago
#10069 Quote
Avatar
  • 9
pdesignz wrote:
If I wanted to have additional sections with dropdowns or submenus would the submenus be within the li element. Here is an example and wondering if this would work for an additional item on the menu as well as submenu when you hover over that item on the menu.

<ul>
<li><a href="http://www.mysite.com">Section Header</a>
<ul>
<li><a href="http://www.mysite.com">Submenu #1</a></li>
<li><a href="http://www.mysite.com">Submenu #2</a></li>
<li><a href="http://www.mysite.com">Submenu #3</a></li>
</ul>
</li>
</ul>

thanks


Hi

I have a similar problem. I need to add in mega menu (motion template) an item for each of our 4 tags. For each tag I need to display all the categories that have products with that tag. Is there a way to embed those tags and categories in mega menu?
Deni
9 years ago
#10072 Quote
Avatar
  • Moderator
  • 389
cbaldo wrote:

Hi

I have a similar problem. I need to add in mega menu (motion template) an item for each of our 4 tags. For each tag I need to display all the categories that have products with that tag. Is there a way to embed those tags and categories in mega menu?


Hi, 

The template of the Mega Menu has changed a little bit. It should look something like this:

<li>
  <span class="with-subcategories">Products</span>
  <div class="plus-button"></div>
  <div class="sublist-wrap">
    <ul class="sublist">
      <li class="back-button">
        <span>back</span>
      </li>
      <li>
      <a href="/computers" title="Computers" class="with-subcategories">Computers</a>            
      <div class="plus-button"></div>
      <div class="sublist-wrap">
        <ul class="sublist">
          <li class="back-button">
            <span>back</span>
          </li>
          <li>
            <a class="lastLevelCategory" href="/desktops" title="Desktops">Desktops</a> 
          </li>
          <li>
            <a class="lastLevelCategory" href="/notebooks" title="Notebooks">Notebooks</a> 
          </li>
          <li>
            <a class="lastLevelCategory" href="/software" title="Software">Software</a> 
          </li>
        </ul>
      </div>
      </li>
    </ul>
  </div>
</li>


This is needed to make the menu looks fine on mobile devices.

The functionality you want is not supported out of the box, so you have to write it and populate the menu item with it.

Let us know if you need any further help !
Best Regards,
Mladen Staykov
Nop-Templates.com
sdvariations
8 years ago
#11865 Quote
Avatar
  • 9
Hi, I work in Nop3.20
i would like to add another topic page in mega menu than the one already present. When i tried to modify the code i get an error message. when re-loading my website.

Please can you advice what code i must insert to add another topic page in Mega menu.
Boyko
8 years ago
#11868 Quote
Avatar
  • 1570
sdvariations wrote:
Hi, I work in Nop3.20
i would like to add another topic page in mega menu than the one already present. When i tried to modify the code i get an error message. when re-loading my website.

Please can you advice what code i must insert to add another topic page in Mega menu.


Hi sdvariations,

Adding a topic is quite simple. In the MegaMenu.cshtml you already have a topic link i.e About Us. So adding a new one should be pretty much the same code but with the system name of the new topic. Here is the code that you need to add:

<li><a href="@Url.RouteUrl("Topic", new { SystemName = "topic system name" })">Link Title</a></li>


Hope this helps!
Regards,
Nop-Templates.com Team
sdvariations
8 years ago
#11876 Quote
Avatar
  • 9
oh... i get confused with the option Mega menu and did not think about the "About Us" haha

Thanks so much
sdvariations
8 years ago
#11878 Quote
Avatar
  • 9
mmmh sorry to bother again.
I would like my topic to have a dropdown like the option MegaMenuTopic.
What would be the code ?
Deni
8 years ago
#11882 Quote
Avatar
  • Moderator
  • 389
sdvariations wrote:
mmmh sorry to bother again.
I would like my topic to have a dropdown like the option MegaMenuTopic.
What would be the code ?


Hi, 

The Mega Menu has a setting "Show Topics Body In Dropdown". Please check it and you will see the topic dropdown.
Best Regards,
Mladen Staykov
Nop-Templates.com
sdvariations
8 years ago
#11886 Quote
Avatar
  • 9
I see the option "Click for dropdown" or the option "Include topic" (which is the one i'm interested) but none "Show Topics Body In Dropdown" in 3.20 version

i've seen in the MegaMenu.cshtml this code regarding MegaMenuTopic, I have modified it to get the topic i wanted but i would like to add more topic like this one so i've tried to copy the following code but get an error at the end.

MvcHtmlString megaMenuTopicBlock = Html.Action("TopicBlock", "MegaMenu", new { systemName = "MegaMenuTopic" });
    if (Model.Settings.EnableMegaMenuTopic && !MvcHtmlString.IsNullOrEmpty(megaMenuTopicBlock))
    {
        <li>
            @megaMenuTopicBlock
        </li>
    }


After the reply of Boyko i tried with the code :

<li><a href="@Url.RouteUrl("Topic", new { SystemName = "topic system name" })">Link Title</a></li>


It works Well But there is no dropdown like the MegaMenuTopic.

Sorry if my previous e-mail wasn't clear and thanks in advance for your help
Deni
8 years ago
#11887 Quote
Avatar
  • Moderator
  • 389
sdvariations wrote:
I see the option "Click for dropdown" or the option "Include topic" (which is the one i'm interested) but none "Show Topics Body In Dropdown" in 3.20 version

i've seen in the MegaMenu.cshtml this code regarding MegaMenuTopic, I have modified it to get the topic i wanted but i would like to add more topic like this one so i've tried to copy the following code but get an error at the end.

MvcHtmlString megaMenuTopicBlock = Html.Action("TopicBlock", "MegaMenu", new { systemName = "MegaMenuTopic" });
    if (Model.Settings.EnableMegaMenuTopic && !MvcHtmlString.IsNullOrEmpty(megaMenuTopicBlock))
    {
        <li>
            @megaMenuTopicBlock
        </li>
    }


After the reply of Boyko i tried with the code :

<li><a href="@Url.RouteUrl("Topic", new { SystemName = "topic system name" })">Link Title</a></li>


It works Well But there is no dropdown like the MegaMenuTopic.

Sorry if my previous e-mail wasn't clear and thanks in advance for your help


Hi, 

This setting is not available in 3.20.

You were on the right way when trying to copy the code and use it with your own topic, you just need to use different names. Try this code and for each topic change the "customTopicBlock1" name:

MvcHtmlString customTopicBlock1 = Html.Action("TopicBlock", "MegaMenu", new { systemName = "CUSTOM_TOPIC_NAME" });
if (!MvcHtmlString.IsNullOrEmpty(customTopicBlock1))
{
    <li>
        @customTopicBlock1
    </li>
}


I hope this helped !
Best Regards,
Mladen Staykov
Nop-Templates.com