Get menu items as data

53 views Asked by At

I am facing an issue while creating a new MediaWiki Skin. I am following the steps mentioned at Manual:How to make a MediaWiki skin#Rendering menus with Mustache. As per documentation, for showing the menu items I am using {{{html-items}}}, but this returns HTML as li elements.

I want to use some specific classes for the menu items with the li and a tags. How can I get the individual menu items, urls as data ?

1

There are 1 answers

5
Tgr On

You can use the SkinTemplateNavigation::Universal hook to manipulate menu links (in MediaWiki 1.37+; there are different hooks in older versions).