? ? Success

User tests: Successful: Unsuccessful:

avatar tenno-seremel
tenno-seremel
25 Apr 2015

Modules have a note field which isn't accessible in module chrome. I use that to pass additional data to module chrome and find it useful.

avatar tenno-seremel tenno-seremel - open - 25 Apr 2015
avatar Fedik
Fedik - comment - 25 Apr 2015

The Note field just for internal use :wink:

avatar tenno-seremel
tenno-seremel - comment - 25 Apr 2015

@Fedik, maybe, but it's just so darn useful it's a waste to not use it.

avatar zero-24 zero-24 - change - 29 Apr 2015
Category Libraries
avatar zero-24 zero-24 - change - 29 Apr 2015
Status New Pending
avatar brianteeman
brianteeman - comment - 25 May 2015

i agree that its intended for internal use only but i also dont see any issue with this change.

In order for people to test it please provide a sample module that uses it


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

avatar tenno-seremel
tenno-seremel - comment - 26 May 2015

Basically, after applying the patch from this pull request you add Custom HTML module to your site, write something in its Note field (accepts a comma separated list here) and use the following module chrome in your template. It should output buttons after module's content (I don't use module title in this example, though).

Template code:

<jdoc:include type="modules" name="sidebar-1" style="buttonizer" />

Module chrome:

function modChrome_buttonizer($module, &$params, &$attribs)
{
    if (!empty($module->content)) {
        echo $module->content;
    }
    if (!empty($module->note)) {
        $button_titles = explode(',', $module->note);
        echo '<p>';
        foreach ($button_titles as $button_title) {
            echo '<button>', htmlspecialchars($button_title), '</button>';
        }
        echo '</p>';
    }
}
avatar brianteeman brianteeman - change - 16 Jun 2015
Labels Added: ?
avatar roland-d roland-d - change - 25 Jun 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-06-25 12:40:16
Closed_By roland-d
avatar roland-d roland-d - close - 25 Jun 2016
avatar roland-d roland-d - close - 25 Jun 2016
avatar roland-d
roland-d - comment - 25 Jun 2016

@tenno-seremel The note field is indeed for internal use, not only for modules but for many other parts of the CMS. It looks like the field is being misused for other needs. There is another PR (#10113) that makes it possible to override the module output so I think that can be used instead in the future. Thank you for your contribution.


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

Add a Comment

Login with GitHub to post a comment