Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

expTheme.php - looks for loginmodule instead of loginController

#402

Migrating old site - which had code like this:

exponent_theme_showModule("loginmodule","Expanded");

In the docs ...

http://docs.exponentcms.org/docs/2.0.2/theme-template-structure

... it suggests that I should use something like this:

// hard coding a controller
expTheme::module(array(
   "controller"=>"links", // the name of controller (exp2 mod) to display
   "action"=>"showall",

...

So I try that for the login:

expTheme::module(array("controller"=>"login","action"=>"showlogin","view"=>"showlogin"));

Doesn't work.

Tracked it down to framework/core/subsystems/expTheme.php

607     public static function showModule($module,$view="Default",$title="",$source=null,$pickable=false,$section=null,$hide_menu=false,$params=array()) {
608         if (!AUTHORIZED_SECTION && $module != 'navigationmodule' && $module != 'loginmodule' && $module != 'loginController') return;

In line 608 I added the loginController part - success ... I can hard-code the login module.

It also means the example code (in the simple theme) works:

expTheme::showController(array("controller"=>"login","action"=>"showlogin","view"=>"showlogin_flyoutYUI"));

HTH.

Reported by Richard Toohey · November 18th, 2011 @ 02:01 AM

State: resolved
Milestone: 2.0.3
Assigned to: nobody

Activity

  1. expNinja
    expNinja
    • State changed from new to resolved
    • Milestone set to 2.0.3
    • Milestone order changed from 124 to 0

    (from [29c24877a0914e91247dc757fb82943cb39cb52c]) Replaces deprecated 'loginmodule' with 'loginController' which NOW allows the navigation & login module to appear on unauthorized pages, since the loginmodule was deprecated, the loginController was not allowed as a valid module on those restricted pages. [#402 expTheme.php - looks for loginmodule instead of loginController state:resolved milestone:2.0.3 owner:dleffler] https://github.com/exponentcms/exponent-cms/commit/29c24877a0914e91...

    November 18th, 2011 @ 12:33 PM

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.