I have add a custom link to main menu in this way Adding a non-category link to the navigation links in magento 2

but how can i put this link BEFORE catalog menu link position?

1 Answer 1


the easy way: override file topmenu.phtml on your custom theme


and if you like you can call cms custom block from admin

<?php $columnsLimit = $block->getColumnsLimit() ?: 0; ?>
<?php $_menu = $block->getHtml('level-top', 'submenu', $columnsLimit) ?>

<nav class="navigation" data-action="navigation">
    <ul data-mage-init='{"menu":{"responsive":true, "expanded":true, "position":{"my":"left top","at":"left bottom"}}}'>
        echo '<li class="level0 nav-2 level-top ui-menu-item" role="presentation">';
        echo $block->getLayout()
        echo '</li>';

        <?= /* @escapeNotVerified */ $_menu ?>
        <?= /* @escapeNotVerified */ $block->getChildHtml() ?>

Your Answer

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

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