How to pass parameters in href?

Yes, it’s for href in preferences (as in your second example with a reference to another preference page.

I found that it’s possible to pass parameters here: I can’t seem to find enough API information
I also found that I can use preference page id with parameters (“testId?id=1”) and app accepts it. testId is the id of another preference page.
The only issue is that I cannot get this parameter in the testId page.

Unfortunately, global variables doesn’t work, because each href in my app should have it’s own set of parameters:

for (int i=0; i<maxNumber; i++) {
   href (name: "test", title: "Testing href", page: "testId?id=${i}");
}