The menu is in a “index-panel.php” snippet wich is included in a template called “index.php”. But if I move the snippet into the template like you supposed to do, it doesn’t change anything.
Maybe you can post your page structure, where are you using which template/controller etc. otherwise it is difficult to help. I don’t know which page your index.php relates to.
I see what you mean but my goal is to collect $tag from an other page called projects as you could see in my controller
Do you mean that ? because doesn’t work too
Yes, I try to collect $tag from projects children pages like you could see in controller.
But <?= in_array($p, $tag)? 'class="active"':'' ?> doesn’t work too
Well, it was just meant as a help for future debugging; of course you have to put that after $tag is defined, i.e. within the foreach loop, not just anywhere.
I really considering that I’m not good enough at coding and maybe ask someone in the “JOBS questions” for my future project instead of broken your time with my questions
That’s not what I mean. When you click on a link to filter the projects, and only then, you get an index parameter in the URL. When you have an index parameter in the URL, $p should have the value of that “tag”. Only then can a tag be active.