I need to change the url from my twig template, when I click in different buttons, whithout a refresh. Is it possible?
I need it because I am having the following problem: if my url is .../project/User/Groups and I click on 'friends' tab (it is a paragraph element with a onclick action), I want the url to be .../project/User/Friends, because all the information is already on the page, and I only hide/show it, but I need the url to change because in the main html.twig template I have a 'info' div in which I show different messages, and, for instance, if I need to show a message from 'friends' tab (the info is on a friends html.twig) and in the url I have .../project/User/Groups, it is not shown.
The parameter in the url after /User/ is used to know which tab has to be selected when I load the page from other urls in my project.
I hope I have explained correctly.