Add link before Catalog Main Menu Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Adding a non-category link to the navigation links in magento 2Add custom menu in existing(Catalog) menu magento 2How to create a main menu with various CMS pages in Magento 2In Magento2, I want to add cms page link in header top menu before wishlist linkhow to add a top link in custom module at prefered positionHow to add custom link in main menu in magento 2?How to add Custom Menu item and submenu in navigation bar Magento 2?add CMS page link category menu in Magento 2Add link to customer-menuHow set my main menu (custom link and category) in my shop with two language version?How to add my own code to replace navitagion bar (main menu)
false 'Security alert' from Google - every login generates mails from 'no-reply@accounts.google.com'
Philosophers who were composers?
What is /etc/mtab in Linux?
Is there an efficient way for synchronising audio events real-time with LEDs using an MCU?
Marquee sign letters
Where to find documentation for `whois` command options?
Did war bonds have better investment alternatives during WWII?
Is there a possibility to generate a list dynamically in Latex?
TV series episode where humans nuke aliens before decrypting their message that states they come in peace
Why did Israel vote against lifting the American embargo on Cuba?
Does using the Inspiration rules for character defects encourage My Guy Syndrome?
How was Lagrange appointed professor of mathematics so early?
Why I cannot instantiate a class whose constructor is private in a friend class?
How can I wire a 9-position switch so that each position turns on one more LED than the one before?
How would you suggest I follow up with coworkers about our deadline that's today?
SQL Server placement of master database files vs resource database files
Retract an already submitted Recommendation Letter (written for an undergrad student)
Is Bran literally the world's memory?
Is there a verb for listening stealthily?
Is it appropriate to mention a relatable company blog post when you're asked about the company?
What is the definining line between a helicopter and a drone a person can ride in?
Putting Ant-Man on house arrest
What happened to Viserion in Season 7?
Was Objective-C really a hindrance to Apple software development?
Add link before Catalog Main Menu
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Adding a non-category link to the navigation links in magento 2Add custom menu in existing(Catalog) menu magento 2How to create a main menu with various CMS pages in Magento 2In Magento2, I want to add cms page link in header top menu before wishlist linkhow to add a top link in custom module at prefered positionHow to add custom link in main menu in magento 2?How to add Custom Menu item and submenu in navigation bar Magento 2?add CMS page link category menu in Magento 2Add link to customer-menuHow set my main menu (custom link and category) in my shop with two language version?How to add my own code to replace navitagion bar (main menu)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
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?
magento2
add a comment |
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?
magento2
add a comment |
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?
magento2
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?
magento2
magento2
asked 2 days ago
AltravistaAltravista
445313
445313
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
the easy way: override file topmenu.phtml on your custom theme
vendor/magento/module-theme/view/frontend/templates/html/topmenu.phtml
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"'>
<?php
echo '<li class="level0 nav-2 level-top ui-menu-item" role="presentation">';
echo $block->getLayout()
->createBlock('MagentoCmsBlockBlock')
->setBlockId('ea_before_topmenu')
->toHtml();
echo '</li>';
?>
<?= /* @escapeNotVerified */ $_menu ?>
<?= /* @escapeNotVerified */ $block->getChildHtml() ?>
</ul>
</nav>
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270865%2fadd-link-before-catalog-main-menu%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
the easy way: override file topmenu.phtml on your custom theme
vendor/magento/module-theme/view/frontend/templates/html/topmenu.phtml
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"'>
<?php
echo '<li class="level0 nav-2 level-top ui-menu-item" role="presentation">';
echo $block->getLayout()
->createBlock('MagentoCmsBlockBlock')
->setBlockId('ea_before_topmenu')
->toHtml();
echo '</li>';
?>
<?= /* @escapeNotVerified */ $_menu ?>
<?= /* @escapeNotVerified */ $block->getChildHtml() ?>
</ul>
</nav>
add a comment |
the easy way: override file topmenu.phtml on your custom theme
vendor/magento/module-theme/view/frontend/templates/html/topmenu.phtml
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"'>
<?php
echo '<li class="level0 nav-2 level-top ui-menu-item" role="presentation">';
echo $block->getLayout()
->createBlock('MagentoCmsBlockBlock')
->setBlockId('ea_before_topmenu')
->toHtml();
echo '</li>';
?>
<?= /* @escapeNotVerified */ $_menu ?>
<?= /* @escapeNotVerified */ $block->getChildHtml() ?>
</ul>
</nav>
add a comment |
the easy way: override file topmenu.phtml on your custom theme
vendor/magento/module-theme/view/frontend/templates/html/topmenu.phtml
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"'>
<?php
echo '<li class="level0 nav-2 level-top ui-menu-item" role="presentation">';
echo $block->getLayout()
->createBlock('MagentoCmsBlockBlock')
->setBlockId('ea_before_topmenu')
->toHtml();
echo '</li>';
?>
<?= /* @escapeNotVerified */ $_menu ?>
<?= /* @escapeNotVerified */ $block->getChildHtml() ?>
</ul>
</nav>
the easy way: override file topmenu.phtml on your custom theme
vendor/magento/module-theme/view/frontend/templates/html/topmenu.phtml
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"'>
<?php
echo '<li class="level0 nav-2 level-top ui-menu-item" role="presentation">';
echo $block->getLayout()
->createBlock('MagentoCmsBlockBlock')
->setBlockId('ea_before_topmenu')
->toHtml();
echo '</li>';
?>
<?= /* @escapeNotVerified */ $_menu ?>
<?= /* @escapeNotVerified */ $block->getChildHtml() ?>
</ul>
</nav>
answered 2 days ago
AltravistaAltravista
445313
445313
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270865%2fadd-link-before-catalog-main-menu%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown