By: Txigreman
Date: 2010-06-02
Time: 10:00
|
Get parameter value.Hi,
I want to know if there is a way to get a parameter's value for use in a function call... I need something like: $TBS->MergeBlock('blockname', my_function('%p1'); Some idea? Thanks |
By: TomH
Date: 2010-06-02
Time: 12:09
|
Re: Get parameter value.Hello, don't explain what you are trying to do, so I am guessing about it... but if you want to use the value of a block field or some PHP var value as input to processing a block value then take a look at the 'ondata' parameter for executing the event function feature in blocks.
Go to the page http://www.tinybutstrong.com/examples.php and examine the "Event functions" example. This is a v.nice feature of TBS! HTH, TomH |
By: Txigreman
Date: 2010-06-02
Time: 12:36
|
Re: Get parameter value.On data is too late... I need the parameter's value to fetch the data array.
I had something like: $TBS->MergeBlock('blockname', 'mysql', '... %p1% ...'); But the query is not always needed, it depends on p1 value and other variables. |
By: Txigreman
Date: 2010-06-03
Time: 13:43
|
Re: Get parameter value.I was thinking about the problem and I think it would be interesting to have a 'callback' source...
MergeBlock('blockname', 'callback+returnsource', 'funcname("%p1%")'; returnsource is the 'source' for the merge (mysql, array, ...). What do you think? |