0
votes

please tell me how can I add a menu item in the frontend using a plugin? I added a template with a new menu item along the path views / frontend / index / main-navigation.tpl. But the menu item appears only on the page created by the plugin, and not on the entire site.

1

1 Answers

0
votes

Here is where the main menu exists:

├── frontend
 │   └── index
 │      └── shop-navigation.tpl

You can override its content or just append to it. Here is how the file content should look like:

{extends file="parent:frontend/index/shop-navigation.tpl"}

{block name='frontend_index_checkout_actions'}
<li class="navigation--entry">
    <a href="" class="btn starButton"> {* Add an URL to the href attribute to make your link work *}
        <i class="icon--star"></i>
    </a>
</li>

{$smarty.block.parent}
{/block}