Well, if you define an "if {$tree_style}" as the best approach then I wholeheartedly agree with you, that looking at the code would have been sufficient 😊. Okay, enough of the underhanded compliments.
You are using a boolean to differentiate between two styles and if the "other" style is true, you mixin the Categoriy::section_style. Now, if I am using the mixin approach, I still need a way to tell the categories includelet WHICH style to mixin. As you have been using a boolean, I can hardly suggest to change the "tree_style" into a string, as this would not be backwards compatible.
Luckily, the open_item parameter for add_to_category provides me with the currently open item, allowing me to render the top navigation's menu item in a different color, if the currently displayed page is in that navigation. In past projects users solved this issue by having an include (as in XoWIKI include of another XoWIKI page) for the main navigation (without drop down menues, left to right, on top of the page), which I deem not ideal, but it worked for them 😊.
Therefore the question: How can I define the mixin class to use in the categories includelet, which is the approach you would take (as I don't want to duplicate the code for the categories includelet just to be able to call a different rendering mixin class) ?