NYCPHP Meetup

[joomla] Module display conditional

Gary Mort bz-gmort at beezifies.com
Fri Aug 17 04:11:30 EDT 2007


Ok, I think I see the problem now:

In joomla.php there is a function called mosMenuCheck.

When it's done doing it's thing, it calls $mainframe->set('menu',X) and 
tells Joomla what menu item is being displayed.

So I'm assuming what you did was add to the module being displayed a 
$mainframe->set('menu',X).

Hmmm.......

Perhaps I could extend mosMenuCheck and add an extra paremeter.  So that 
on the links coming IN if you placed ?dspmenu="Polls" for example, it 
would force a fake to the Polls menu.

Than I would need to find some way of forcing a component or module to 
add that paremeter to all it's URL's.

Which brings me back to modifying every module and many components to 
add in an option to display "pretend to be menu" field.

Or maybe it would make more sense to have a Mambot which can be 
configured to check all the url's on the page, and based on it's 
configuration, append the parameter to them where it's useful.

Ehhh...what a bad set of choices, either hack core Joomla files or hack 
every module I want to make this change to.

OMG, I've actually discovered a point in time where it would be usefull 
to program in an object oriented fashion.  If I could override that 
function instead of changing it, I wouldn't need to hack the core file.  
Heck has frozen over. :-)



More information about the Joomla mailing list