NYCPHP Meetup

NYPHP.org

[joomla] Module display conditional

kirill at hostnetservices.com kirill at hostnetservices.com
Fri Aug 17 04:27:25 EDT 2007


Something like that.  I only had to do this for one Module.  What you 
trying to have is a module that will display a Module and have menu Module 
results as well.   Maybe we will talk about this at the meeting...

Gary Mort <bz-gmort at beezifies.com> 
Sent by: joomla-bounces at lists.nyphp.org
08/17/2007 04:11 AM
Please respond to
"NYPHP SIG: Joomla" <joomla at lists.nyphp.org>


To
NYPHP SIG: Joomla <joomla at lists.nyphp.org>
cc

Subject
Re: [joomla] Module display conditional






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. :-)
_______________________________________________
New York PHP SIG: Joomla! Mailing List
http://lists.nyphp.org/mailman/listinfo/joomla

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/joomla/attachments/20070817/9e5daa2f/attachment.html>


More information about the Joomla mailing list