Skip to content

Instantly share code, notes, and snippets.

@thePunderWoman
Created April 17, 2013 20:11
Show Gist options
  • Save thePunderWoman/5407358 to your computer and use it in GitHub Desktop.
Save thePunderWoman/5407358 to your computer and use it in GitHub Desktop.
Parent_cats
// Get the parent categories
List<APICategory> parent_cats = CURTAPI.GetParentCategories();
foreach (APICategory parent in parent_cats) {
List<APICategory> subs = CURTAPI.GetSubCategories(parent.catID);
parent.sub_categories = subs;
}
ViewBag.parent_cats = parent_cats;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment