Hello, I've been using TBS since... last week, and it's awesome!
I want to nest two blocks, but I dont understand how to do it.
I want to have a bunch of big divs wich contains other divs, a table,... and inside the table I have a select with it's options that are different from a big div to an other.
HTML
...
<div>
<div id="[bigBlock.id;block=((div));]">
...
</div>
...
[bigBlock.someField;]
...
<form>
<table><tr><td>
<select>
<option value="[optionsBlock.id;block=option;]">[optionsBlock.name;]<option>
</select>
</td></tr></table>
</form>
</div>
...
|
PHP
...
select stuff from my database
while($row = $res->FetchRow())
{
here I build an $array from what's in $row
array_push($arrayBigBlock, $array);
from one field of $row, I build an $arrayOptions wich contains data to fill my select (combo box)
$TBS->MergeBlock('optionsBlock', 'array', $arrayOptions);
}
$TBS->MergeBlock('bigBlock', 'array', $arrayBigBlock);
...
|
obviously it doesn't work, or else I would not be asking for help, so ... HELP!
thanks