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.