User tests: Successful: Unsuccessful:
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.
Category | ⇒ | Libraries |
Status | New | ⇒ | Pending |
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
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>';
}
}
Labels |
Added:
?
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-06-25 12:40:16 |
Closed_By | ⇒ | roland-d |
@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.
The Note field just for internal use