Change URL path with reusable elements?

There are some plugins to help with this “sudsy” and this thread - How do you custom your site URLs - #3 by boston85719 (I don’t use them, just know of them)

Under the covers, the javascript is “pushstate” to alter the browser history - so search around for this also.