Re: Make a component as much as possible opened; use of events but with a module as client

63 views
Skip to first unread message

Nils Rückmann

unread,
Mar 20, 2013, 4:41:06 PM3/20/13
to joomla-de...@googlegroups.com
There are many ways to solve this.
The possible easiest way would be a "wrapper-task" like "...task=item.foo&foo=bar", so you can run the plugins in your foo-function.

Nils Rückmann

unread,
Mar 21, 2013, 11:17:55 AM3/21/13
to joomla-de...@googlegroups.com
It might not be the best solution, but why not use your module helper instead of native event handling.

Same approach. You have your controller which loads the module helper and call the function you.

But like i said, it's not a pretty way. Modules are supposed to be more like "display only" character.

cavo789

unread,
Mar 22, 2013, 4:24:36 AM3/22/13
to joomla-de...@googlegroups.com
Thanks Nils, Thanks Studio 42

@Nils

I understand what you're saying but to load the module helper and to call it; I need to put a few lines of code in the component.  Right?   Just right now, it's OK because I'm the developper of both of them but what if, tomorrow, a third developper make a module for my component and this module will generate ajax calls.  How the module can process the ajax call without adding a line of code in the component ?  I'm perhaps missing something.

My AS IS situation is like you described.   The component's controller receive a task "modcalendar.getNextMonth"; the component knows that he need to load the helper of the module and to call the getNextMonth() function.  He know that because I've added these few lines.  How to do without putting these lines in the controller ?

Many thanks!!!

@Studio 42

Thanks !   I've tried to download your component/module but I can't find a zip.    If I need to install your com_module component, it'll fail.   I can't ask every users of my component to do this :-)   The module should be autonom.


Thanks to both of you!


Christophe

Nils Rückmann

unread,
Mar 22, 2013, 10:52:17 AM3/22/13
to joomla-de...@googlegroups.com
Now i get it. But unfortunately there is no way to "speak" to a module directly.

Thomas PAPIN

unread,
Mar 22, 2013, 11:30:37 AM3/22/13
to joomla-de...@googlegroups.com
This should be maybe a subject for a google code summer :)

Ajax Module Request without any component (or just a core component to route the query to any modules)


2013/3/22 Nils Rückmann <syb...@gmail.com>
Now i get it. But unfortunately there is no way to "speak" to a module directly.

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To post to this group, send an email to joomla-de...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

cavo789

unread,
Mar 23, 2013, 6:50:01 AM3/23/13
to joomla-de...@googlegroups.com
@Nils : ;-) 

Once again, thank you!

@Thomas

Will be great.

Studio 42

unread,
Mar 23, 2013, 7:37:38 AM3/23/13
to joomla-de...@googlegroups.com
My component can be added in a pack.
Look in Joomla doc how to do a pack.

I said the router.php have a problem the com_module.ZIp is not updated. simply remove the router.php if you have some route bug with SEF active.

I think my component has to be in the joomla core as default. This solve many hacks and make it possible to use the same type of MVC as a component.
I don't have update com_module. Because i wrote com_extend. Permitting to call module+plugins+template files the same way as com_module.
But in the past i never had to call plugin or templates files.
If you want to add ajax in a template to call specific component(eg. to do slide-show) this is possible with com_extend. but for now it's only in beta stage.

I think a pool to add a such extension in the core where a good starting point, to know if more developer have such problem.
I had this problem many times, i don't develop something for nothing.

Reply all
Reply to author
Forward
0 new messages