TinyButStrong - the PHP Template Engine
Categories > [old] TbsOoo & TinyDoc >

subblocks

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs

By: william
Date: 2010-08-01
Time: 22:06

subblocks

here is my template
name: [asb.name; block=table:table-row;sub1=services] date: [asb.SDate]
{the follwing are in a table}
[asb_sub1.#] [asb_sub1.desc;block=table:table-row] [asb_sub1.charge]
[asb_sub1.#] [asb_sub1.desc;block=table:table-row] [asb_sub1.charge]
(copied and possibly mangled from the subblock section of examples)

Here is my php loading the data
$S = array();
$S[0] = array ('name'=>'John Smith', 'SDate'=>'8/1/2010');
$S[0]['services'][] = array ('dos'=>'7/10/10', 'desc'=>'Psychotherapy, full', 'charge'=>'210.00');
$S[0]['services'][] = array ('dos'=>'7/13/10', 'desc'=>'Psychotherapy, full', 'charge'=>'210.00');
$S[0]['services'][] = array ('dos'=>'7/17/10', 'desc'=>'Psychotherapy, full', 'charge'=>'210.00');
$S[0]['services'][] = array ('dos'=>'7/24/10', 'desc'=>'Psychotherapy, full', 'charge'=>'210.00');
here is the merge statement
$TBS->MergeBlock('asb',  $S);
and here is the error message:
TinyButStrong Error in block's definition [asb.name...] : at least one tag corresponding to table:table-row is not found. Check opening tags, closing tags and embedding levels.

Being as I am trying to figure out what I am doing, I could use a bit of help.
Thanks in advance.
bill
By: Skrol29
Date: 2010-08-02
Time: 00:56

Re: subblocks

Hi Bill,

It seems that the TBS fields [asb.name;block=table:table-row;...] is not put inside the table row.
You said "the follwing are in a table", like if [asb.name] was not. Since you've defined "block=table:table-row", it should be inside such a tag.
By: william
Date: 2010-08-02
Time: 13:17

Re: subblocks

Of course...
ok, now I have the outer table merge working.
my template is:
{outer table}
name: [asb.name; block=table:table-row;sub1=services] date: [asb.SDate]
{then I have another table defined inside}
[asb_sub1.dos; block=table:table-row] [asb_sub1.desc][asb_sub1.charge]
{end of inner table}
{end of outer table}
I am using the same php program as above
error message is:
TinyButStrong Error in block's definition [asb_sub1.dos...] : at least one tag corresponding to <text:span text:style-name="T2">table:table-row is not found. Check opening tags, closing tags and embedding levels.
Where am I going wrong now ?
bill
By: Skrol29
Date: 2010-08-02
Time: 15:10

Re: subblocks

Hi,

It seems clear to me: you've formated on part or your text, not on purpose. Maybe with a copy/paste operation.
Try to delete the formating elements, by cut and past with no format, or typing it again, or by pasting the normal format upon this text.
By: william
Date: 2010-08-02
Time: 15:31

Re: subblocks

You were absolutely correct, but, how did you know ?
I see no hint in the error that it was that.
Many thanks.

bill
By: Skrol29
Date: 2010-08-02
Time: 16:10

Re: subblocks

Yes there is:
at least one tag corresponding to <text:span text:style-name="T2">table:table-row is not found.

Its says that TBS was looking for a tag named '<text:span text:style-name="T2">table:table-row' which is absolutely not what you asked for. You asked for "table:table-row".
By: william
Date: 2010-08-03
Time: 11:08

Re: subblocks

Thank you.
I live and learn.

bill