HomefieldOfView | SPi-V dev

Navigation

user

getURL query string

Is it possible to send dynamic query parameters with getURL?
For example:

<action event="press" type="getURL"
url="http://www.myurl.de/testing.php?param1='=getProperty('some_object','value')'" target="_blank" />

I would like to send current scene/object values to a given URL.
It would open up great possibilities ... connect to database ... :-))

Re: getURL query string

Will add this functionality in an upcoming release. The syntax will be slightly different:

<action event="press" type="getURL"
url='"http://www.myurl.de/testing.php?param1=" & getProperty("some_object","value")' target="_blank" />

Re: getURL query string

Thank you Aldo for your immediate feedback!
I'm longing for this little feature :-)
It would be a great thing for my intended PHP interface.

best regards
Michael

hasta la victoria siempre!

Re: getURL query string

Is that functionality present in actual version? Since Your post You have published two new SPi-Vs. And does it refer only to the url property or is/will be available to any part of code?

Re: getURL query string

It was added in SPi-V 1.4.6

You can use the attributes='=...' syntax for the following attributes action nodes:

  • value attribute for a setproperty action
  • url attribute for a geturl action
  • message attribute for a logmessage action

For most other attributes, you can use a variable and the attribute="$variable_id" syntax to do just about the same:

...
<variable id="my_variable" />
...
<action type="setproperty" target="my_variable" property="value" value='=getproperty("_camera","pan")+20' />
<action type="setview" pan="$my_variable" />
...

(untested, but this should work ;-)