Alright, I'm new to XML and OpenTBS so this concept of blocks etc is very confusing for me, and when I thought I had the gist of it, my client asked for even more of me. I've got a table of customers and their items, the client wants one single docx which repeats a template per customer containing the items in a table.
I'm thinking that it'd work with the whole docx template being in a "block" and the table is a "sub-block", the rest of the template uses data from the block and the table uses data from the sub block.
This is where I get confused.
How can I iterate over an array (which contains customer information) and when the sub block requires information of a specific customer, draw from the items array?
For me, the "manual" included with TinyButStrong is not good enough, but I'm sure that you guys will know where to point me.
Simplified Array:
$customer = array(
array("id" => 1,
"name" => "Foo Bar",
"email" => "foo@bar.com",
"itemsinfo" => array(
"itemid" => array(
"itemname" => "name"
)
)
),
array("id" => 2,
"name" => "Foo2 Bar2",
"email" => "foo2@bar2.com",
"itemsinfo" => array(
"itemid" => array(
"itemname" => "name"
)
)
)
);
Many thanks.