Using url links to get to different eHMI pages

I am looking into a more modular way to work with the HMI:
In my code I would have a dictionary type of array
aHL[0].sOption1Text := ‘Go to\
Power Page’;
aHL[0].sOption1Url:='https://192.168.14.114/ehmi/hmiapp.html?HmiPage=eltek.json’;
aHL[1].sOption1Text := ‘Go to\
Safety Page’;
aHL[1].sOption1Url:='https://192.168.14.114/ehmi/hmiapp.html?HmiPage=safety.json’;
And then define which part of the dictionary to use:
IF eHandlerVal = eHandler#Power THEN sHL := aHL[0];
ELSIF eHandlerVal = eHandler#SafetyRelay THEN sHL := aHL[1]; END_IF;

With this the hope is that I only have one button defined in HMI and it can load a page internally for me and I can just update my dictionary with more and more options.

(as opposed to countless buttons that I have to say specifically load page → eltek, load page → safety and show them dependent on different scenarios)

My questions are:

  1. Even though its set to open the same window it opens a new page, so I am likely to end up with many windows open - is there a way to force it to really be the same window?
  2. The url stays at my hard coded state (so even if I click to go to the home page from safety page it does go to the home page but the url is still 'https://192.168.14.114/ehmi/hmiapp.html?HmiPage=safety.json’ → I think this means that if you reload the page it jumps back here now → how can I ‘clear’ the url neatly?
  3. The back button does not allow me to use it but I think probably because of my url method.. I’m mostly ok with that.
  4. Finally, is there already hmi modular functionality like this that I’ve just missed?
    Thanks!

To clarify for question 2 on clearing → If I just have my home button https://192.168.14.114/ehmi/hmiapp.html this works in that it loads the home page but have the same problem as (1) which is another new window (whether I set window behaviour to new window or same window)