Jump to content

Custom admin pages in dropdown, Reno theme


Recommended Posts

I've set up a basic module, ProcessDocumentation, that is intended to add a tree of documentation pages under the Admin page.

The module doesn't actually use templates to display anything. The ___execute method displays a list of links to the documentation pages (child pages). Clicking on one of those, the ___executeView method uses the URL segment to load the appropriate page contents and display it.

This works OK when using the default theme. There is no expanded sub-menu (e.g. hovering over Setup > Templates displaying the list of templates), but the top-level "Documentation" page is clickable which displays the list of pages. In Reno, though, those links are in the sidebar and the top-level links are click-to-expand.

I'm having difficulty displaying the child documentation pages in Reno when clicking to expand, without using a template file. It looks like in AdminThemeRenoHelpers::renderSideNavItem() method it's loading child pages that are viewable. Since the documentation pages don't use a template, they're not getting populated.

I've toyed around with the 'nav' key in the getModuleInfo() but that doesn't seem to work. I also tried out renderListJSON() and ___executeNavJSON() which I saw in some other modules, but I'm pretty sure those aren't used in this context, but in the search methods.

I could add a template file, of course, but I don't want to render an entirely different layout. I just want to display the regular admin interface with the documentation page body in the main content area. Any suggestions?

Link to comment
Share on other sites

Per discussion with @renobird in IRC, I've decided to add child pages that also use ProcessDocumentation and then grandchild pages that use template: documentation. Then the ___execute() method will display the page contents and/or a list of links to the sub-pages as appropriate.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...