Passing variable parameter in URL to other pages

This might be a known fact in Axure RP 10 but I spent hours researching and found many people struggling with the same problem. Maybe if I were a developer I would know this.

I was trying to pass a variable to another page so that I reduce the number of pages in my prototypes. Eg. I have one page called “review order” which acts as a template with many hidden components which are shown/hidden depending on the variable passed in the URL.

I could only find how to do this in Axure RP 9, which you simply add a Global Variable to the page and then call the variable in the URL as follows:

However, this doesn’t work in Axure RP 10. You have to use ? instead of #.

I spent hours trying to figure this out so I’m posting here in case others face the same problem.