How to create a custom menu for a theme in Omeka S?



I want to write a custom code for menus in a theme (or module).

I was looking for a solution to this issue and I found some variants (neither of them have worked for me indeed):

  1. Extend class Helper/Navigation/MyMenu.php :

  2. Rendering a custom menu using a partial view script :

I don’t know how to modify bootstrap and which source files must be edited.
Sorry, I’m begining looking into the code of Omeka (although these are related to Zend instead of Omeka), so detailed explanations will be welcome.