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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Similar Content

    • By hollyvalero
      I like the Reno wrapper for the admin.  After looking at UIKit, then switching back to Reno, the back end is all Reno but the basic back end login page /processwire or /whateveryoucallit is displaying the original Default instead of the Reno login.  I realize this is a first world problem, but I can't seem to reinstate the Reno login.  Tried installing/uninstalling...  It's not the same page code and it's not the same style sheets... I can't uninstall the default ...what am I doing wrong?

    • By Mustafa-Online
      How To Show User Actual Name Insteal of "user-name" .. I'm Using "AdminThemeReno" here.

    • By AndZyk
      this is a small request, but since a while I develop exclusive in Google Chrome and if I have the developer tools open and try to access the back end, I always get following notification:
      It seems like the Chrome developer tools are looking for a css map file inside the AdminThemeReno, which is not present.
      Maybe this doesn't bother anybody and it is rare, that I try to access the back end with the developer tools, but I just wanted to point this out. 
      Regards, Andreas
    • By gRegor
      This is kind of a theme-related question (Reno), but also a Process module question, so posting it here.
      I have a Process module I use to display new menu items in the left sidebar (Reno theme) for documentation. I handle displaying the documentation content through the module's ___execute and ___executeView methods, so I don't have a template file. The problem I'm running into is that the theme checks viewable() (reference) on each child page, and since there's no template file, none of the child pages get listed in the sidebar.
      I'm wondering if there's some way to get around this "viewable" issue. I tried setting the documentation pages template to "admin" but as expected, viewing them gives me a "this page has no process assigned" error message.
      I think this might be a feature request for the Reno theme, really, but wanted to post first in case someone had a quick solution I'm overlooking. Thanks!
      Page structure:
      - Admin
      -- Documentation (template: admin, process: ProcessDocumentation)
      --- How to do x, y, z (template: documentation, no associated template file)
      --- How to do another thing (same)
    • By clickpass
      Hello there, WireFolks!

      I am just about crashing into ProcessWire and try to make my way through. A Great CMS! What puzzles me right now is

      --why do the changes in my Reno Theme not apply?

      Any suggestions? Everything seems to be installed properly. Reno came along with my fresh 2.7.2 installation. I want to know, considering that there might be something about modules in general which I need to understand.

      Best regards
  • Create New...