M
M
Mechanic2016-08-31 11:46:05
1C-Bitrix
Mechanic, 2016-08-31 11:46:05

How to implement a two level menu with href="#" on the first level?

Good afternoon, comrades. How can you implement a two-level menu without the first HC (so that the first level is non-clickable, i.e. href="#")? Out of the box, the menu is tied to a link. If you change the link at the first HC, the menu items of the second level are not loaded. Any thoughts?
So far, only changing the first-level link attribute with JS after DOM construction comes to mind, but I would like to know if this method is anal. Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2016-09-01
@bitrixweb

Everything is easy to do in the component template
if IS_PARENT echo "#"

O
Oleg Mifle, 2016-08-31
@OlegMifle

You can change it through result_modifier, it should work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question