I would like to ask you if it is possible to make the current state on a single nav link for multiple pages. Currently, the current state is generated by linking nav link to the current page.
For example Mainpage / news (current state) Main page / news (current state) / acticle |||||| On this subpage I would like to have current state on my nav link ‘‘news’’.
Ok, so the splitted[1] will always contain the first part of the path (after the initial slash). The if clause checks that is it equal with the path you want to highlight. E.g. with a path