我有一个 Joomla 模板,它没有在我的一个页面上显示模块。该模块已发布并分配给常规发布的菜单项。
在做了一些研究后,我发现这个问题可能是由于模板覆盖造成的。这是我的 module.php 文件...这里有什么东西会导致模块不显示在特定页面上吗?
谢谢,
<?php
defined('_JEXEC') or die;
function modChrome_themeHtml5($module, &$params, &$attribs) {
$moduleTag = $params->get('module_tag');
$headerTag = htmlspecialchars($params->get('header_tag'));
$headerClass = $params->get('header_class');
$bootstrapSize = $params->get('bootstrap_size');
$moduleClass = !empty($bootstrapSize) ? ' span' . (int) $bootstrapSize . '' : '';
$moduleClassSfx = htmlspecialchars($params->get('moduleclass_sfx'));
if (!empty ($module->content)){
$html = "<{$moduleTag} class=\"moduletable {$moduleClassSfx} {$moduleClass}\">";
if ((bool) $module->showtitle){
$html .= "<{$headerTag} class=\"moduleTitle {$headerClass}\">{$module->title} </{$headerTag}>";
}
$html .= $module->content;
$html .= "</{$moduleTag}>";
echo $html;
}
}
function modChrome_html5nosize($module, &$params, &$attribs){
$moduleTag = $params->get('module_tag');
$headerTag = htmlspecialchars($params->get('header_tag'));
$headerClass = $params->get('header_class');
$bootstrapSize = $params->get('bootstrap_size');
//$moduleClass = !empty($bootstrapSize) ? ' span' . (int) $bootstrapSize . '' : '';
$moduleClassSfx = htmlspecialchars($params->get('moduleclass_sfx'));
if (!empty ($module->content)){
$html = "<{$moduleTag} class=\"moduletable {$moduleClassSfx}\">";
if ((bool) $module->showtitle){
$html .= "<{$headerTag} class=\"moduleTitle {$headerClass}\">{$module->title}</{$headerTag}>";
}
$html .= $module->content;
$html .= "</{$moduleTag}>";
echo $html;
}
}
function modChrome_modal($module, &$params, &$attribs){
$moduleTag = $params->get('module_tag');
$headerTag = htmlspecialchars($params->get('header_tag'));
$headerClass = $params->get('header_class');
$bootstrapSize = $params->get('bootstrap_size');
// $moduleClass = !empty($bootstrapSize) ? ' span' . (int) $bootstrapSize . '' : '';
$moduleClassSfx = htmlspecialchars($params->get('moduleclass_sfx'));
if (!empty ($module->content)){
$html = "<div class=\"modal fade moduletable {$moduleClassSfx} loginPopup\" id=\"modal\">";
$html .= "<button type=\"button\" class=\"close modalClose\">×</button>";
if ((bool) $module->showtitle){
$html .= "<div class=\"modal-header\">";
$html .= "<{$headerTag} class=\"{$headerClass}\">{$module->title}</{$headerTag}>";
$html .= "</div>";
}
$html .= "<div class=\"modal-body\">";
$html .= $module->content;
$html .= "</div>";
$html .= "</{$moduleTag}>";
echo $html;
}
}