Hi..
I've try using smarty for my programming and i think it's quite usefull. Smarty it lacking of example i think.. and i didn't get much from the docs also.
And i've try all over net.. and i find only u have review smarty quite well. I've one question about using smarty for displaying category->subcategory tree.. using {section}{/section}
I've one table that content id,name,parent fields. This table will
contain category and subcategory. All i want to know is how to loop
using {section} that will loop first to category (that have parent 0) and
loop at their subcategory that have parent same as category id.
for eg.
id | name | parent |
1 | Category1 | 0 |
2 | Category2 | 0 |
3 | subcategory1a | 1 |
4 | subcategory1b | 1 |
5 | subcategory2a | 2 |
6 | subcategory2b | 2 |
so subcategory1a and 1b is under Category1 and Category2 has subcategory2a and b under it.
Any idea how to use it, when using smarty? {section}{/section}
I want to generate something like this
Category1
-Subcategory1a
-Subcategory1b
Category2
-Subcategory2a
-Subcategory2b
Or any other way that i can extract UI from the Business Object code..
Thanks in advance
r0kawa