Top Menu Labels Magento 2 Theme Development

Top Menu Labels Magento 2 Theme Development

Max Pronko

6 лет назад

1,325 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@anuox3712
@anuox3712 - 13.05.2020 20:20

Thanks for this tutorial. As you suggested I have added my custom menu using the observer "page_block_html_topmenu_gethtml_before", It's displaying in menu.
$data = [
'name' => __('My menu),
'id' => 'unique-id',
'url' => 'Menu URL',
'is_active' => 0
];
If I add "is_active" => 0 , the magento default behaviour add class "active" is not working when I was in my custom page and If I add "is_active"=>1, it's always adding the active class. If I navigate to next menu the active class of my custom menu was not yet removed. How can I achieve this.


Also how can I add <span class="new">New</span> using this oberver?


Thanks.

Ответить
@LamNguyen-gt6gm
@LamNguyen-gt6gm - 21.10.2019 12:46

how can i find top menu to edit?

Ответить
@reland2k10
@reland2k10 - 27.05.2019 05:21

I'm a magento newbie and I love you! Thank you for your hard work man.

Ответить