Make custom module with content (copy of mod_custom)
visible content editor.
No content editor
In file:
components/com_config/view/modules/tmpl/default.php
on line 18 is variable $hasContent which is dependent on module name. Module which has other name than custom, mod_custom doesn't get content form because of condition on line 182 of same file.
Is it possible to make other decision algorithm for show content form? Thanks
3.9.2
Thanks for trying to help, yes in backend it works, my issue is in front end (as in name of issue). And for clarification I mean create new module like "mod_something", no another instance of mod_custom via module manager.
Could you add here a zip of your new module? I may have an idea but first need to check your code.
Thanks.
Would you use this module only for your needs or do you want to distribute it?
Only for my needs...
In that case, it is very easy.
For now, create an override in the html folder of your template.
default.php
is a copy of /components/com_config/view/modules/tmpl/default.php
In that file, modify line 18
from
$hasContent = empty($this->item['module']) || $this->item['module'] === 'custom' || $this->item['module'] === 'mod_custom';
to
$hasContent = empty($this->item['module']) || $this->item['module'] === 'custom' || $this->item['module'] === 'mod_custom' || $this->item['module'] === 'mod_customadv';
And that will work.
It does not solve the issue globally for any module of that type without this override, but I am still looking into this.
Thanks, I actually use this sollution, but if there will be some upgrade in com_config, I will not get it, or I will need to check changes on every update... So this is reason why I open issue, that maybe someone come with better sollution for module type check...
Can you try to replace /components/com_config/view/modules/tmpl/default.php
by this file
default.php.zip
It works. Thanks. Will it be in next release?
I will propose a PR for it and, after being tested, maintainers will decide if/when it is included.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-01-20 17:53:04 |
Closed_By | ⇒ | infograf768 |
@mino182
Please mark your test OK in https://issues.joomla.org/tracker/joomla-cms/23604
Joomla version?