On Thu, 25 Sep 2003 16:38:49 +0200, Ralf Ullrich wrote:

Hi Ralf

See below.

>=> $html) and this works fine. but this is bad if you want to style
>certain rows in a different way from other rows. But i don't know
>how to
>handle this with TMPL_LOOP, since I never can know, how many
>children
>exist for one parent and how deep this hierarchy will be.
>has anyone on this list done something like this and could point me
>in
>the right direction?

I see Karen has given you some ideas.

To create a crude tree-like structure within a table, try prefixing
the rows with multiple white boxes and then an 'elbow' box.
Demo images:
http://www.deakin.edu.au/~rons/html/black-and-white-boxes.html
This method is trivial, but may help.

Also, learn how to use H::T's __first__ etc tokens to change the CSS
class of a <td>, etc. Demo:
        <tmpl_loop name = outer_result_loop>
                <tmpl_if name = __first__>
                        <tr>
                                <tmpl_loop name = inner_result_loop>
                                        <td class = "headbox">
                                                <tmpl_var name = result_td>
                                        </td>
                                </tmpl_loop>
                        </tr>
                <tmpl_else>
                        <tr>
                                <tmpl_loop name = inner_result_loop>
                                        <td>
                                                <tmpl_var name = result_td>
                                        </td>
                                </tmpl_loop>
                        </tr>
                </tmpl_if>
        </tmpl_loop>

--
Ron Savage, [EMAIL PROTECTED] on 26/09/2003. Room EF 312
Deakin University, 221 Burwood Highway, Burwood, VIC 3125, Australia
Phone: +61-3-9251 7067, Fax: +61-3-9251 7604
http://www.deakin.edu.au/~rons




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to