Categories > TinyButStrong general >

Question about Headergroups.

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Jeraych
Date: 2004-07-25
Time: 00:48

Question about Headergroups.

Alright, lets say I have a multidimensional array like this...

$forum[] = array("id"=>"1", "group"=>"general", "name"=>"General Posting", "description"=>"This is just a test forum for now.");
$forum[] = array("id"=>"2", "group"=>"general", "name"=>"Questions", "description"=>"Questions about this board.");
$forum[] = array("id"=>"3", "group"=>"programming", "name"=>"PHP", "description"=>"All about PHP");
$forum[] = array("id"=>"4", "group"=>"programming", "name"=>"PERL", "description"=>"All about Perl");

Alright, now I merge it.. $TBS->MergeBlock("forum", $forum);

and show it.

Alright I am not sure how to display it now in the template file... I tried this..

<table border=1>
<tr>
<th width="100">ID</th>
<th width="100">NAME</th>
<th width="100">DESCRIPTION</th>
</tr>
<tr bgcolor="yellow">
<td colspan="3">[forum.group;block=tr;headergrp=group]</td>
</tr>
<td>[forum.id;block=tr]</td><td>[forum.name]</td><td>[forum.description]</td>
</tr>
</table>

It gives me lots of errors...
I am not sure why it would though, any help would be greatly appreciated though. Thank you.
By: Skrol29
Date: 2004-07-25
Time: 14:24

Re: Question about Headergroups.

Hi Jeraych,

In your template snippet the <tr> for second row is missing.
And TBS is looking for it to define the block section.
By: Jeraych
Date: 2004-07-27
Time: 01:24

Re: Question about Headergroups.

omg, Now I understand alot more about how this works, btw, Skrol, this is a nice template system, very nice job on it.  Thank you.
By: Jeraych
Date: 2004-07-27
Time: 02:28

Re: Question about Headergroups.

These are the errors I got, (btw, ther eis a block=tr; in the second row)...

TinyButStrong Error (Block definition): [forum.id] can not be enlarged or extended.


TinyButStrong Error (Array value): Can't merge [forum.id] because there is no key named 'id'. This message can be cancelled using parameter 'noerr'.


TinyButStrong Error (Array value): Can't merge [forum.name] because there is no key named 'name'. This message can be cancelled using parameter 'noerr'.


TinyButStrong Error (Array value): Can't merge [forum.description] because there is no key named 'description'. This message can be cancelled using parameter 'noerr'.

I added block=tr to the rest of the ones in the row, and still nothing changed... I am not sure why its happening, of course I am a novice when it comes to TBS... Thanks again.
By: Skrol29
Date: 2004-07-27
Time: 09:52

Re: Question about Headergroups.

Hi,

When I just add the "<tr>" at good place in your snippet, all run ok for me. Can you send your new piece of template ?
By: Jeraych
Date: 2004-07-27
Time: 17:34

Re: Question about Headergroups.

...NOW i see what you are saying, I thought you meant block=tr, *sighs* I feel so stupid... sorry for this... I really am.  Thank you very much.
By: Jeraych
Date: 2004-07-27
Time: 17:44

Re: Question about Headergroups.

Skrol, it works perfectly now, sorry for the confusion, I just was in too big of a rush and not paying attention to what you actually meant, I was thinking it was block=tr that you had been talking about... It does work, and if you want to see, go here:

http://anger.roguemind.com/forum/boards.php

Thank you again for all your help, and keep up the good work, this template engine is the best.
By: Skrol29
Date: 2004-07-28
Time: 00:03

Re: Question about Headergroups.

The URL doesn't work :(
By: Jeraych
Date: 2004-07-28
Time: 00:47

Re: Question about Headergroups.

I just tried it to make sure, and it works for me just fine...