Hook active trail path
I found the answer to my own question.

In the view I added a field with the taxonomy term ID / node ID which is although used for my menu and hide the output and do a rewrite of the output.
I pasted the following code in the text field for rewrite; field_categorie-tid is my reference term from the menu.

menu_tree_set_path('menu-categorie', 'taxonomy/term/[field_categorie-tid]');


Instead of taxonomy/term/[field_categorie-tid] you can also use node/[nid].

I added in the head section a global field with PHP and token, and put &lt;?php [field_categorie]?&gt;.

That's all; no hooks nor custom scripting in the template.