skip to Main Content

I’m working in a bootstrap template in magento and my menu contains an ul markup for the user menu navigation, i want change the markup for this sections to a div container but i can’t find the template file.

In my layout file default.xml i have

<block class="MagentoCustomerBlockAccountNavigation" name="top.links">
<arguments>
    <argument name="css_class" xsi:type="string">header links</argument>
</arguments>

But i can’t find where is the markup in my template folder "Freego"

Best regards

2

Answers


  1. If you trace the parent classes of the navigation block you’ll see it extends

    MagentoFrameworkViewElementHtmlLinks
    

    This block creates the ul element programmatically, there is no template to edit. Look at the method

    _toHtml()
    

    You can easily override the block to change the markup returned, or just wrap it in a container in the xml layout to add a div wrapper etc, depending on exactly what you’re trying to do.

    Login or Signup to reply.
  2. It is navigated in function _toHtml()

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search