? Success

User tests: Successful: Unsuccessful:

avatar ced1870
ced1870
15 Dec 2015

Allows the plugins to catch the module object (content and params) before it renders into the page. This is very useful for design purposes

avatar ced1870 ced1870 - open - 15 Dec 2015
avatar ced1870 ced1870 - change - 15 Dec 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Dec 2015
Labels Added: ?
avatar brianteeman
brianteeman - comment - 15 Dec 2015

It would be useful if you could provide an example of how to test this functionality

avatar ced1870
ced1870 - comment - 15 Dec 2015

Hi Brian,
Here an example of use :
1/ create a sytem plugin
2/ write
function onAfterRenderModule($module, $attribs) {
$module->content = '

' . $module->content . '
';
}
3/ this will render a div around the module that can be used to add some styles or link to some JS to make it float

This is a basic example, where of course you would need in your plugin to test if you are in admin or front, make some additional condition to target the needed module and have the best conditions to do it (like any good developer would do in any plugin ;) )

Hope that this is clear and that you will think about implementing it.
Please let me know
Regards
CEd

avatar Fedik
Fedik - comment - 15 Dec 2015

personally, I think that for such cases the ModuleChrome https://docs.joomla.org/Module_chrome cover all needs here

avatar ced1870
ced1870 - comment - 15 Dec 2015

@fedik : how to you catch and render the module from a plugin ? the module Chrome covers all needs if you are inside a template only
I use the JModuleHelper class in many cases and sometimes it needs to change the module content

avatar Bakual
Bakual - comment - 15 Dec 2015

I tend to agree with @Fedik here, at least for the use case you mentioned. The module chrome is exactly meant to provide design around a module content. Like adding a div around the content.
If you need to alter the output of the module itself, template overrides are the way to go, assuming the module is coded right.

I don't see yet the usecase where you would need a plugin event, but feel free to make an example.

avatar ced1870
ced1870 - comment - 15 Dec 2015

I have made a little example above :)

Imagine that you want to develop a plugin that will add some options into a module (any module in this case), then using the plugin you can check the options and do some work. In my case I add a button to make the module sticky.
If the user click the button in the module options, the plugin alter the module code before rendering in the page to add the sticky class.

this is a simple example, now if you know of to do all this using Module Chrome, let me know :)
I don't see where is the problem to add this event, is there anyone ?

avatar Bakual
Bakual - comment - 15 Dec 2015

Thanks for the example. It makes more sense now.

avatar brianteeman
brianteeman - comment - 18 Dec 2015

Are these three issues related #8693 #8296 #3105


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8693.

avatar nonumber
nonumber - comment - 18 Dec 2015

Is pretty much a carbon copy of: #8296

avatar ced1870
ced1870 - comment - 18 Dec 2015

I have not seen the other requests that are similar. For me, no matter who's name is for the pull request, the only thing that is important to me is that this trigger is added to allow more customization and user interaction. Thank you

avatar ced1870
ced1870 - comment - 6 Jan 2016

Hi
Is there any news about the implementation of this trigger ?
Thank you
CEd

avatar Bakual
Bakual - comment - 6 Jan 2016

Without any human tests, it will usually go nowhere.

avatar ced1870
ced1870 - comment - 6 Jan 2016

Ok so please tell me wo needs to test and how.

avatar Bakual
Bakual - comment - 6 Jan 2016

Anyone (beside you as it's your own PR and we assume you tested it) can test this PR by using the Joomla patchtester (http://joom.la/patchtester).
They should then log their results in https://issues.joomla.org/tracker/joomla-cms/8693

Usually we require two good tests for anything to be merged.

Since this introduces a new feature/API point, it can go into Joomla 3.6.0 earliest (3.5.0 is feature locked already as it is in beta).

avatar ced1870
ced1870 - comment - 6 Jan 2016

ok thank you for the informations

avatar andrepereiradasilva
andrepereiradasilva - comment - 6 Jan 2016

The process for testers is described here https://docs.joomla.org/Testing_Joomla!_patches

Normally it helps getting testing if you have a clear "How to test" or "Testing instructions" block in the PR description with clear and simple instructions on how to test (and screenshots if needed).

Example: #8350

avatar nonumber
nonumber - comment - 6 Jan 2016

But this PR can get closed as it is a duplicate of #8296

avatar Bakual Bakual - change - 6 Jan 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-01-06 12:32:30
Closed_By Bakual
avatar Bakual Bakual - close - 6 Jan 2016

Add a Comment

Login with GitHub to post a comment