简体   繁体   中英

Axure - url parameter for logic?

I'd like to have a parameter in the Axure prototype URL, like " http://share.axure.com/Foo/homepage.html?state=guest " which will set an Axure variable "state" to "guest", for example.

(Right now, I have a navigation page (preceding the "homepage") load by default where where the user selects one of several links that opens the "homepage" with the "state" variable set.)

Any assistance would be appreciated.

hope this will help you

You want to open a particular state of the dynamic panel according the variable you passed on it.You can do this in axure using GLOBAL VARIABLE

First click on it.

在此处输入图片说明

This will lead you to this pop up.

在此处输入图片说明

and on your onload event you can open any state according to your condition(if/else).

To expand on what Anurag Bhakuni answered and give an updated response, in Axure RP 8, you can set global variables on interactions. ( If you're familiar with jQuery, Axure's interactions are like jQuery events ).

Create an object - in your case a text link. Select the link and head over to the Inspector pane and click the PROPERTIES tab. This will open the Case Editor .

Double-click the interaction you want to use, in this case OnClick .

In the left column, you have a list of actions to choose from. Select Set Variable Value and then click Add variable .

Set Variable Value and Add variable

Give the new variable a new name. I used State . When a user clicks on the text link, this variable will be set to guest .

enter image description here

Now, on subsequent pages, you can use this variable with conditional statements. Once again in the Case Editor , you can click Add Condition at the top of the dialogue box.

  • Select value of variable in the first dropdown
  • Select State in the second dropdown
  • Write "guest" in the input box

This says, "If the value of State equals "guest"...

...do something. Select an action from the left column to tell it what to do if this condition is met.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM