1

I am trying to modify the top navigation (the navigation that shows categories and subcategories as the main menu). I am using a free template(Ketty, from TemplateMonster) which in turn is based on Magento Blank Template. But, as i am very new to Magento, i am unable to figure out two things:

  1. How to change location of menu. Currently it is coming next to the logo and before the customer menu, search box and shopping cart. I want to move it down just below it, in it's own block / container. But i am unable to understand the positions mentioned. Where is menu called from? How is it rendered there?

  2. Is there a way to add other links from the CMS to the menu?

I tried looking around but, ,most are the resources are based on Magento 1.x hence could not find something substantial. Other issue is that I can't find enough time to read the documentation of Magento 2, which I am sure would provide all the answers, but due to lack of time, could not cover the length and breadth of the required section. Any help is much appreciated.

TIA.

4
  • anybody? even suggestions regarding appropriate Modules are a welcome help.
    – Vimal
    Feb 9, 2016 at 11:33
  • you can simply do it using default.xml in vendor/magento/magento_theme_default/design/frontend/magento_theme/layout/default.xml Jul 18, 2016 at 4:32
  • @PGSutariya OP is asking for a solution in M2. The file you might be referencing is vendor/magento/module-theme/view/frontend/layout/default.xml, but it's not clear how to add links in a layout file. Oct 21, 2016 at 19:27
  • @Design by Adrian You can add links in navigation visit: magento.stackexchange.com/questions/95017/… It is done by creating module as show in given link If you want to add link in top links then visit this link: magento.stackexchange.com/questions/92333/… Oct 27, 2016 at 4:23

1 Answer 1

1

To change a location of an element you can use: move

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>
    <move element="product.info.review" destination="product.info.main" before="product.info.price"/>
</body>

Look here: http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-manage.html#layout_markup_rearrange

To add additional Links to the Topmenu you should have a look here: Magento 2: How can I add External URL in top menu

or here: Adding a non-category link to the navigation links in magento 2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.