On Sat, Feb 7, 2009 at 1:21 PM, jacmgr <[email protected]> wrote:
>
> I think I am missing some simple BW Idea.   Just from a PHP config
> function, how can I save a datavalue or pagevalue into a different
> page.
>
> So this works for GETTING a value
>> > $myvar1 = BOLTvars("somepagename:sitetheme");    //data var
>
> Is there similar for PUTTING a value? like this??
>> >  SOMECOMMANDSAVE_BOLTvars("somepagename:sitetheme", 'RED');    //data var
>> >  SOMECOMMANDSAVE_BOLTvars("somepagename::sitecolor", 'BLUE');    //page var

If you can wait for the next release, you will have this. In fact this
was EXACTLY one of the main reasons I've been reworking the savedata
code. It's doable as is, but not easily. Once this next release comes
out you will simply be able to do:

BOLTsavedata(Array('field1'=>'value1', 'field2'=>'value2'), $page);

And both values will be saved. However, it may or may not be saved in
time to show up on the same pageload. Probably, but not tested.

As for info vars, those are a little different, and you can handle it right now.

To do this using markup you would do:

[(info field=myfield value=myvalue target=some.page)]

To convert this to php, you would do this:

BOLTcomm2func('field=myfield value=myvalue target=some.page', 'info');

Basically this says take the first field, convert it to regular
parameters and run it through the info function. It's a great utility
for this kind of thing.  You could of course generate the args by hand
into the proper array and pass it to BOLTFinfo($args, $zone), but I
find this shortcut generally easier to use.

Cheers,
Dan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to