As one of the items in the top menu Bitrix bind id (css)?

As one of the items in the top menu Bitrix bind id (css)?
July 12th 19 at 17:00
1 answer
July 12th 19 at 17:02
Solution
  1. In template code, menu component to add kakoynit increment and add it to the id for the menu item
  2. To use the extension mode menu , and display the value in the id in the template component
Detail as possible))) I just don't know what the increment is and how to add it in id ? - erika_Kuhic commented on July 12th 19 at 17:05
: you make the variable $k = 0; in the cycle of forica (which are items) to the menu item write ...a class=" menu_item_<?=$k;?>"... <?$k++;?> - Destiny86 commented on July 12th 19 at 17:08
or, in id instead of a class. Where you prefer. Best course in the writing class - Destiny86 commented on July 12th 19 at 17:11
Thank you ! I will try))) - erika_Kuhic commented on July 12th 19 at 17:14
...a class=" menu_item_"...

and that means (...)? the first ellipsis is where to insert (as I understand ), and second (?). - erika_Kuhic commented on July 12th 19 at 17:17
neither where it is not necessary to insert ellipses. It https://ru.wikipedia.org/wiki/%D0%9C%D0%BD%D0%BE%D... I wrote for meaning that there was something before the code and after the code - Destiny86 commented on July 12th 19 at 17:20
Well, that's understandable))))) - erika_Kuhic commented on July 12th 19 at 17:23
I meant that the class and ID to paste in the link of the item. But "$k++;" - I do not understand where to insert! - erika_Kuhic commented on July 12th 19 at 17:26
cogniti further, better before closing Foreca - Destiny86 commented on July 12th 19 at 17:29
so here's the foreach you have to have and not to amend the existing for this task, I understood correctly? - erika_Kuhic commented on July 12th 19 at 17:32
Thank you ))) have set up) - erika_Kuhic commented on July 12th 19 at 17:35

Find more questions by tags 1C-Bitrix