Open djjudas21 opened 1 year ago
You can, but if your menus aren't very dynamic and you've already written them, you should probably keep using the menus you have, via your base template and maybe come context processor.
How did you render menus before?
My menus are just chunks of plain HTML with Boostrap, in a Django template file: https://github.com/camerahub/camerahub/blob/master/schema/templates/nav.html
They're pretty simple, and they work, but it's not pretty :slightly_smiling_face:
Follow-up question... is it possible to include a template in a Page by reference to its template filename? My menu is defined in nav.html
and just gets included into my old template. Is there an easy way to carry this over with iommi? Something like:
menu = Template('nav.html')
@djjudas21
menu = Fragment(template='nav.html')
I'm beginning to use iommi to refactor my django project, which uses a lot of custom templates etc. I've figured out how to map most of my features across to iommi features to simplify my codebase, but one thing I haven't found yet is a way to implement nested menus.
This is how I'm using Bootstrap menus at the moment: https://camerahub.info/
Is this kind of behaviour possibly with iommi? Thanks