By: Marcus
Date: 2005-02-23
Time: 10:52
|
Is this a bug?
Hi Skrol,
I have a 2D array and some part of the HTML looks like
this:
<table class="prodline">
<tr>[bm;block=tr;]
<td class="function">[bs.[bm.$].0;]</td>
<td class="name"><a class="pl_a" href="mailto:[bs.[bm.$].2;magnet=a;mtype=m+m]">[bs.[bm.$].1;]</a></td>
</tr>
</table>
|
Now if bs.[bm.$].2 is empty then the <a> tags are removed, however
then the part bs.[bm.$].1;] does not show the value of the array
anymore, it just writes 'bs.[bm.$].1;]', ie it's not merged.
If bs.[bm.$].2 is not empty then [bs.[bm.$].1;] is merged, ie
I can see it's value. Where is the problem?
Best regards,
Marcus
|
By: Skrol29
Date: 2005-02-23
Time: 11:27
|
Re: Is this a bug?
Hi Marcus,
Your snippet works correctly for me (TBS 2.0 and 2.01).
Here is the code I used:
include_once('tbs_class.php');
$mb_lst = array();
$mb_lst[] = array('Webmaster','Bob','bob@toto.fr');
$mb_lst[] = array('Gestionnaire','Yann','yann@toto.fr');
$mb_lst[] = array('Commercial','Yves','');
$mb_lst[] = array('Boss','Jhon','jhon@toto.fr');
$TBS = new clsTinyButStrong;
$TBS->LoadTemplate('test.htm');
$TBS->MergeBlock('bm',$mb_lst);
$TBS->MergeBlock('bs',array($mb_lst));
$TBS->Show();
|
|
By: Marcus
Date: 2005-02-23
Time: 11:48
|
Re: Is this a bug?
Hi Skrol,
I have to say it once more, you are a star and your
support is perfect & excellent!
My PHP looked like this before and it worked
fine if I did not use mtype=m+m:
$TBS->MergeBlock('bm',$data); // Main block
$TBS->MergeField('bs',$data); // Sub-block
|
I changed it to what you wrote and it works great now!!
Thanks again a million,
Marcus
|
|
Posting in progress.
Please wait...
|