I'm trying to get the shop by filters to display a new section called category. I managed to edit template/category/layer/view.phtml to get it to display the category section but the subcategories display all the options including subcategories, subsubcategories, and so on. I only want to display the categories that are one level higher than the main category. Sort of what it looks like in a dropdown navigation menu. I've also tried several coding strategies inside template/category/layer/filter.phtml. I've gotten close but managed to mess up the main navigation in the process.
The category filter needs to work for all product selections from the main menu, so I don't want to modify all 1800 products to add a field that contains the parent category. I've gotten so close to getting it to work but I have problems using getLevel, and getID on certain variables.