My site menu is made of tabs.
There are some articles that are children of a specific page (tab) using page hierarchy, but I've got a problem: when reading these articles the tab becomes inactive again...like I wasn't at any page of the site...

how can I add the active class to the tab on the function that outputs the menu using page hierarchy (or whatever)?