By: Jared
Date: 2013-02-28
Time: 03:53
|
dynamic sub-blocksI have working code the produces a 3 level deep tree. Here is the code:
This is the results
I would like some help creating some MergeBlock and template code that can handle an arbitrary depth. I do not know how many levels deep my tree will become over time. I was thinking about counting my array elements and building my MergeBlock calls inside a loop - not sure how that will work yet. I do not have a good plan for how to build the dynamic template. Any help / suggestions would be greatly appreciated. |
||
By: Jared
Date: 2013-02-28
Time: 21:24
|
Re: dynamic sub-blocksHere are a couple solutions I am considering.
1) application code that updates a static template and controller code for the MergeBlock method calls any time tree depth changes. 2) do it in javascript - convert php arrays to json and insert into dom Anyone have other ideas? |
||
By: Skrol29
Date: 2013-03-03
Time: 14:01
|
Re: dynamic sub-blocksThey are some solution for hierarchical menus at the Tips & Trics forum.
|
||
By: Jared
Date: 2013-03-05
Time: 22:19
|
Re: dynamic sub-blocksHi Skrol,
I am working through the solutions in the tips forum. I am working through this problem based on you post here: http://www.tinybutstrong.com/forum.php?thr=1833 Do you have an example of that solution using an array instead of multiple queries? I am also working through the example posted here: http://www.tinybutstrong.com/forum.php?msg_id=8926 But this solution differs significantly from your solution. I can modify my array to fit a solution, but I don't want to add a separate class to implement MBt's solution if I do not have to. Thanks for the hard work you do with TBS! - Jared |