Categories > TinyButStrong general >

Array with mergeblock

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Emil
Date: 2006-10-02
Time: 16:56

Array with mergeblock

Hi, I got a problem with mergeblock.

I use an example in post, please open this page first :
http://www.tinybutstrong.com/forum.php?msg_id=6374#

In my case, "resultado" is an instance variable, it belongs to a class.
so, I set : $objTBS>ObjectRef =& $myClass;

However, I can not use %p1% in this way : 'resultado[%p1%][musica]'


$objTBS->MergeBlock("blk_galeria",'array','resultado');
$objTBS->MergeBlock("blk_musica",'array','resultado[%p1%][musica]') ;

TBS seems believe 'resultado' should be a globle variable. but it is not.

What can I do? My TBS version is 2.05.

Thanks.
By: Skrol29
Date: 2006-10-02
Time: 23:05

Re: Array with mergeblock

Hi Emil,

The source type 'array' with dynamic string like 'resultado[%p1%][musica]' is supported for object only since TBS 3. Before this version it can be only an array.

If you cannot migrate to TBS 3, I suggest that you code your own small data functions. It's a set of 3 functions that can retrieve data the way you've coded it. This is described in the manual.