简体   繁体   中英

Joomla 3: custom module style with chrome

I'm trying to set custom style for Joomla module. I have created file modules.php in /templates/MY_TEMPLATE_NAME/html directory. Content of this file below:

defined('_JEXEC') or die;

function modChrome_custom($module, &$params, &$attribs)
{
     echo '<h3>test style chrome</h3>';
}

Now, I try to output module from my template with this style. I do it this way:

 <jdoc:include type="modules" name="position-1" style="custom"  />

But it looks like my custom style is not applying to the module and all I see is a standard module layout. Did I miss something?

您需要转到扩展->模块管理器,选择要应用自定义样式的模块,在“高级”选项卡中,有一个选项“模块样式”,在模板名称下应有“自定义”选项,将其作为样式

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM