Cameron,
Glad you posted your code.
Add this to the bottom where all the other smarty assignments are:
Code:
$smarty->assign("categories_level_1",$categories_data1);
$smarty->assign("categories_level_2",$categories_data2);
Also,
You can remove the following "last" line of code:
Code:
$categories_data2[$key][category] = strrchr($categories_data2[$key][category], "/");
It should work now, I think
