#448 ✓resolved
dleffler

Bug?: Too many expTheme methods for displaying a module

Reported by dleffler | December 19th, 2011 @ 09:11 PM | in 2.0.4 (closed)

We should consolidate all the various methods into a single method with some helper methods (based on the current method names) that simply call the main method:

  • all the methods are basically copies of each other to some extent
  • we can't simply remove the 'old' methods since they may be used in some installations
  • most of these helper methods could simply be called forcing the 'scope'
  • some of these helper methods simply strip the 'scope' and pass it through another helper method that sets the 'scope' back to what it was originally called with (efficiency?)

The following methods are currently offered:

Params passed by position:

  • showModule
  • showSectionalModule (calls showModule)
  • showTopSectionalModule (calls showModule)
    • module
    • view
    • title
    • prefix
    • pickable
    • hide_menu

Params passed by array index:

  • module (calls either showController, showModule, showSectionalModule, or showTopSectionalModule)
  • showController (calls either module or showModule)
  • showSectionalController (calls showController)
    • source
    • module
    • controller
    • view
    • title
    • chrome
    • scope
    • params (if params passed as an index inside params??)

Comments and changes to this ticket

  • dleffler

    dleffler December 19th, 2011 @ 10:22 PM

    Everything exists out through showModule, so we'll make it THE method:

    module calls

    • showController (if is a controller) which calls
      • module (if is a module)
      • showModule
    • showModule
    • showSectionalModule which calls
      • showModule
    • showTopSectionalModule which calls
      • showModule

    showSectionalController calls

    • showController which calls
      • module
      • showModule
  • dleffler

    dleffler December 20th, 2011 @ 06:07 AM

    Perhaps the intent is to have the 'module' method (called with a param array) as the main 2.0 method for hard-coded modules and it should be a parser/wrapper before calling the 'showModule' method (called with parameters) which is the main routine. If so:

    • the showModule should probably NOT be a public method
    • the other 4 methods should call/redirect to the module method or showModule whichever is the most efficent and carries the least code in that module.
  • dleffler

    dleffler December 22nd, 2011 @ 03:28 PM

    After several discussions and revising the help documentation for 2.0.3 (reading the older entries), it would be best to use the 'module' methods as the preferred method to create hard-coded modules. This in turn will route through the generic 'showModule' method. The other 4 methods will continue to exist, but simply be a wrapper for calling the 'module' method.

    The documentation site has already been updated to reflect this concept (v2.0.3). The 'module' call is the only one used in the documentation.

  • dleffler

    dleffler December 23rd, 2011 @ 09:58 PM

    • Milestone set to 2.0.4
    • Milestone order changed from “98” to “0”
  • dleffler

    dleffler January 13th, 2012 @ 07:18 PM

    expTheme was streamlined in a recent push to promote the 'module' method as the preferred call for creating modules...though old methods still are present and work. Actually this was an accidental push and not intended to be added to the repo yet, but should be fully working)

  • dleffler

    dleffler January 25th, 2012 @ 02:03 AM

    • State changed from “new” to “resolved”

    This has been streamlined and the docs have been updated, though it could be cleaned up more in the future.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Bug Tracker for Exponent CMS

Shared Ticket Bins

People watching this ticket

Tags

Pages