? ? Success

User tests: Successful: Unsuccessful:

avatar nonumber
nonumber
6 Nov 2015

This PR adds an extra event trigger to the module rendering process.
This way plugins can manipulate the rendered output of modules separately.

To test, create a system plugin foobar with this:

class PlgSystemFooBar extends JPlugin
{
    public function onAfterRoute()
    {
        JFactory::getApplication()->registerEvent('onAfterRenderModule', array($this, 'onAfterRenderModule'));
    }

    public function onAfterRenderModule(&$module)
    {
        if (is_null($module))
        {
            return;
        }

        $module->content = '<p style="color:red">Module content replaced</p>';
    }
}

Or add the registerEvent and onAfterRenderModule code to an existing plugin.

avatar nonumber nonumber - open - 6 Nov 2015
avatar nonumber nonumber - change - 6 Nov 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Nov 2015
Labels Added: ?
avatar Kubik-Rubik
Kubik-Rubik - comment - 6 Nov 2015

@nonumber Makes sense to have such a trigger, thank you! Please remove the whitespaces in line 260.

avatar richard67
richard67 - comment - 6 Nov 2015

@nonumber Just seen that there is PR #3105 for the same purpose (but with a different solution) with milestone Joomla! 3.6.0. Is this one here now a duplicate, and the old one should be closed if this one is accepted?

avatar nonumber
nonumber - comment - 6 Nov 2015

That PR is for the complete module position. Modules (plural) as opposed to module.
So not a duplicate. Different use.

avatar richard67
richard67 - comment - 6 Nov 2015

Ah, ok, I see. Thanks for the clarification.

avatar wilsonge wilsonge - change - 6 Nov 2015
Milestone Added:
avatar wilsonge wilsonge - change - 6 Nov 2015
Milestone Removed:
avatar wilsonge wilsonge - change - 6 Nov 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 7 Nov 2015
Easy No Yes
avatar zero-24 zero-24 - change - 7 Nov 2015
Milestone Added:
avatar zero-24 zero-24 - change - 7 Nov 2015
Category Libraries
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/8296.

avatar nonumber
nonumber - comment - 18 Dec 2015

#8296 is the same as #8693.

#3105 is something different:

That PR is for the complete module position. Modules (plural) as opposed to module.
So not a duplicate. Different use.

avatar kanich
kanich - comment - 18 Dec 2015

Exactly as @nonumber expressed above - #3105 is dealing with class JDocumentRendererModules in libraries/joomla/document/html/renderer/modules.php file. All other PRs are different.

avatar waader waader - test_item - 6 Jan 2016 - Tested successfully
avatar waader
waader - comment - 6 Jan 2016

I have tested this item :white_check_mark: successfully on abfc4ee

Thanks nonumber!


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

avatar ced1870 ced1870 - test_item - 7 Jan 2016 - Tested successfully
avatar ced1870
ced1870 - comment - 7 Jan 2016

I have tested this item :white_check_mark: successfully on abfc4ee


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

avatar nonumber
nonumber - comment - 26 Jan 2016

Any chance this can get merged before it gets out of sync?

avatar ced1870
ced1870 - comment - 27 Jan 2016

+1 with Peter. This is a needed improvement

avatar brianteeman
brianteeman - comment - 27 Jan 2016

(someone has set this to 3.6 milestone)


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

avatar ced1870
ced1870 - comment - 27 Jan 2016

thank you Brian.
Sorry for my ignorance about all this process. Does this mean that it will integrated, or is it still waiting for something like says the "pr-staging" label ?

avatar brianteeman
brianteeman - comment - 27 Jan 2016

What it means is that someone has decided that this can only be merged in Joomla 3.6

avatar nonumber
nonumber - comment - 27 Jan 2016

So should I change this so it is a PR to the 3.6.x branch?
Or does this just stay open till someone feels like merging it to that branch?

avatar brianteeman
brianteeman - comment - 27 Jan 2016

As far as I know its the latter

On 27 January 2016 at 11:50, Peter van Westen notifications@github.com
wrote:

So should I change this so it is a PR to the 3.6.x branch?
Or does this just stay open till someone feels like merging it to that
branch?


Reply to this email directly or view it on GitHub
#8296 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar wilsonge wilsonge - change - 28 Jan 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-01-28 20:25:35
Closed_By wilsonge
avatar wilsonge wilsonge - close - 28 Jan 2016
avatar wilsonge wilsonge - reference | 410ce3b - 28 Jan 16
avatar wilsonge wilsonge - merge - 28 Jan 2016
avatar wilsonge wilsonge - close - 28 Jan 2016
avatar wilsonge wilsonge - change - 28 Jan 2016
Milestone Added:
avatar wilsonge wilsonge - change - 28 Jan 2016
Milestone Removed:
avatar nonumber
nonumber - comment - 28 Jan 2016

Thanks :)

avatar nonumber nonumber - head_ref_deleted - 28 Jan 2016
avatar Kubik-Rubik
Kubik-Rubik - comment - 29 Jan 2016

@wilsonge Since it is merged now for Joomla! 3.5, we should not forget to update the documentation for core triggers! @MATsxm

avatar MATsxm
MATsxm - comment - 29 Jan 2016

:+1:
As a non dev, I will let you got for it but let me know if any help is needed.
https://docs.joomla.org/Plugin/Events
Thanks all

Add a Comment

Login with GitHub to post a comment