Open Toutouwai opened 6 years ago
Some extra clarification:
It seems you can use executeNavJSON()
for the first level of child items so long as the page for the Process module is not a direct child of Admin (i.e. the page is a subpage of Pages, Setup, etc). But this doesn't work if the Process module page is a direct child of Admin (i.e. appears in the admin masthead). Could something be done to allow executeNavJSON()
to work in these circumstances?
@ryancramerdesign - this would be really useful please - it's strange to me that you can use executeNavJSON()
if the page is a child of Setup or similar, but not if it's a direct child of the main Admin page.
This issue is still a huge limitation for me :( Any chance to get this implemented @ryancramerdesign ?
Short description of the enhancement
Process modules can define child nav items using the
nav
element ofgetModuleInfo()
(example in ProcessModule). But this is not as useful as it could be becausegetModuleInfo()
is a static method so there is no ability to define nav items dynamically, depending on the saved module config or in a hookable method for instance.It is possible to define the navigation dynamically for the next level down because that is set in
executeNavJSON()
which is called via AJAX. But that isn't always an adequate solution - you end up having to create some unnecessary/awkward nav item ingetModuleInfo()
just so you can useexecuteNavJSON()
for the real nav items. And it is also problematic if you want to conditionally show either some or zero nav items.I expect it wouldn't be a trivial change to allow dynamic nav child items for Process modules as I think that first level is cached currently. But it would be much more flexible and useful if those items could be set dynamically.