How to pass a variable to another page?

+1 vote
asked Aug 10 by Charlie (2,210 points)

This is probably a really stupid question, but...how do I pass a variable to another page?

I want to <<set $armour to "leather">> and go to passage [[inventory]] in one click.

I cannot work out how to do it.  :-D

1 Answer

+1 vote
answered Aug 10 by Chapel (27,390 points)
selected Aug 24 by Charlie
 
Best answer

You can use a setter link

[[inventory][$armour to 'leather']]

Or a <<link>> macro. 

<<link [[inventory]]>>
    <<set $armour to 'leather'>>
<</link>>

EDIT: FYI, passing has a specific meaning in programming and this isn't it. Not a huge deal, just want to alleviate potential future confusion. 

commented Aug 10 by Charlie (2,210 points)
Thank you very much.  :-)
...