|
Posted by HawkEye on 11/19/05 02:01
J.O. Aho wrote:
<snip>
>
>
> It's not impossible, but requires some thinking and at least at first not
> think much about how ugly it may look.
>
>
> I would start of making a HTML-table where you print the head in the first
> row/cell, on the second row I would create new tables with the subs to the
> head. Inside each of the tables I would set on the second row the subs to the
> subs in their own tables and keep on doing that until you managed to print out
> everything you need.
>
>
> +--------------------------------------------------------+
> | HEAD |
> +--------------------------------------------------------+
> | +-------------------------+ +------------------------+ |
> | | Sub 1 | | Sub 2 | |
> | +-------------------------+ +------------------------+ |
> | | +---------+ +---------+ | | +--------------------+ | |
> | | | Sub 1 A | | Sub 1 B | | | | Sub 2 A | | |
> | | +---------+ +---------+ | | +--------------------+ | |
> | +-------------------------+ +------------------------+ |
> +--------------------------------------------------------+
>
> You may need to use some kind of recursive function for this, and this would
> work dynamically, a change to the organization and the page would look
> different without need of code change.
>
>
> Sorry no code example, but it will not be that difficult for you, I think.
>
>
> //Aho
>
Thanks, I was hopping to avoid tables and that sort of recurstion but I
think your right. It is the only way to do it. The MPTT method is very nice
requiring only one SQL call but positioning things afterwards is a nightmare :)
Cheers for the help.
--
Regards
Neil
Registered Linux User 324599
Why does the sun come out during the day, when it would be so much more
useful if it came out at night when it was dark?
Navigation:
[Reply to this message]
|