By: Mankiy
Date: 2003-06-30
Time: 06:06
|
The first Template Engine...This is the First Template Engine I've seen working for me for mysql and all the stuff Im needing done........
theres jsut one problem, for me........ I need it to do this: MAIN TITLE SUB_TITLE SUB_TITLE MAIN_TITLE SUB_TITLE SUB_TITLE but its doing this: MAIN TITLE MAIN_TITLE SUB_TITLE SUB_TITLE SUB_TITLE SUB_TITLE Is there a way to do that atm? if so, that would be GREAT, ty :) |
|||
By: Mankiy
Date: 2003-06-30
Time: 06:12
|
Re: The first Template Engine...and sorry if this is already explained somewhere, but Im REALLY busy and dont have much time to go browsing, I have 4 projects, 3 of them I have to complete this wk, and its really a hassle 0_o
|
|||
By: Skrol29
Date: 2003-06-30
Time: 09:07
|
Re: The first Template Engine...Hello Manki,
I'm afraid I don't undestand your problem. Could you give more detail ? |
|||
By: Pirjo Posio
Date: 2003-06-30
Time: 10:33
|
Re: The first Template Engine...Is this problem solved in Short TBS Examples by example named Headers?
|
|||
By: Mankiy
Date: 2003-06-30
Time: 18:24
|
Re: The first Template Engine...hmmm, Im getting data out of two tables.....
hyper_main and hyper_sub Hyper main conatins the main _name; hyper_sub contains sub_name, sub_description, mods, last_post, and last_date; I want it to show the main_name from hyper_main and then the sub_names that go with it. there are two main_names and 6 sub_names, 2 sub_names to each main_name get what im saying now? |
|||
By: Mankiy
Date: 2003-07-01
Time: 01:28
|
Re: The first Template Engine...do you get that explination?
if you dont, im gonna have to start being more precise 0_o |
|||
By: Skrol29
Date: 2003-07-01
Time: 01:44
|
Re: The first Template Engine...Yes please.
I can't see what is your query. Is there one or two ? If there is only one query, you can make a header group in your block. Just as said Pirjo. |
|||
By: Mankiy
Date: 2003-07-01
Time: 01:55
|
Re: The first Template Engine...heres the current code for the Template, the PHP script, and a screenshot of what its doing....
TEMPLATE:
PHP:
and here is the screenshot: http://members.lycos.co.uk/clanx/screen.jpg Where you see the light table rows above, those are the main_names the 6 rows below that are the sub_names... so here is how i want it to go: main_name sub_name sub_name main_name sub_name sub_name does that help any? |
|||
By: Skrol29
Date: 2003-07-01
Time: 10:49
|
Re: The first Template Engine...Hello Mankiy,
Yes, its perfect clear now. There is two ways to do what you want. The simpliest way is to use headers. First of all, you have to 'link' somehow your main and sub data in order to display a main and its subs bellow. PHP:
Then you have to change your template in order to have only one block. You can define one block on several rows using the parameter 'extend'. The other way is to link you different block using clones blocks. Clones blocks enables you to pass parameters to the SQL statement for each cloned blocks you have. First to have to extend the 'main' block in order to have it nesting the 'sub' and 'c1' blocks (see the 'extend' parameter). Then you have to merge the 'main' block. This way 'sub' and 'c1' are cloned. Then use clone parameters (see cloned blocks) to merge 'sub' and 'c1' blocks linked to each main_id. |
|||
By: Mankiy
Date: 2003-07-01
Time: 22:26
|
Re: The first Template Engine...im not really understanding the clone blocks, I looked into it in the tbs_us_help.html file, but it jsut confused me more, that file always does 0_o
|
|||
By: Mankiy
Date: 2003-07-03
Time: 04:30
|
Re: The first Template Engine...I just dont get how they are used, i tried several ways, and none seem to work 0_o
|
|||
By: Skrol29
Date: 2003-07-03
Time: 09:44
|
Re: The first Template Engine...Hummmmm
You seem to be unluky with TBS. If it's bot confidential, could you send you template + code + tables structure so I can try them on my PC. |
|||
By: Mankiy
Date: 2003-07-03
Time: 20:15
|
Re: The first Template Engine...send them thru what?
Its not confidential, its just forum code, i send it thru ur mail... |
|||
By: Skrol29
Date: 2003-07-03
Time: 20:19
|
Re: The first Template Engine...Yes, by email.
It's on the left of this message. <- here (skrol29@freesurf.fr) |
|||
By: Mankiy
Date: 2003-07-03
Time: 20:27
|
Re: The first Template Engine...wait, i jsut post it here....
no sense in dealing with mail.... here is the Template Code (original)
PHP Code:
and the table structures:
there |
|||
By: Mankiy
Date: 2003-07-04
Time: 02:25
|
Re: The first Template Engine...I will be gone for the Holiday weekend, i be back sunday, and ty for all the help....
|
|||
By: Skrol29
Date: 2003-07-06
Time: 02:37
|
Re: The first Template Engine...Hello Mankiy,
First of all, you've forgotten the
I've tried your code and it goes better with the delimiter re-definition. |
|||
By: Mankiy
Date: 2003-07-07
Time: 00:41
|
Re: The first Template Engine...no, I changed those also.....
|
|||
By: Skrol29
Date: 2003-07-07
Time: 01:42
|
Re: The first Template Engine...Hello Mankiy,
I've tried to do your page with only one query in order to use the TBS header blocks but it is not so easy because you want your page to display some info for each Sub entities. Here is how you can do your page with clones blocks. Clones blocks is a way to perform sub-blocks. PHP:
HTML:
|
|||
By: Mankiy
Date: 2003-07-07
Time: 02:33
|
Re: The first Template Engine...o!, i get how it works now :)
ty for all the help, hope i wasnt THAT much of a burden :) and i was using the extend thing wrong also 0_o |