Joomla模块,获取“显示/隐藏模块标题”参数

3

我正在覆盖mod_menu default.php文件,并希望从模块选项中接收“show_title”参数。使用Joomla 3!

<?php
    $doc = JFactory::getDocument();
    $page_title = $doc->getTitle();

    $menu = &JSite::getMenu();
    $active = $menu->getActive();
    $menuname = $active->title;
    $parentId = $active->tree[0];
    $parentName = $menu->getItem($parentId)->title;

if ($params->get('show_title')):
?>
<h2><?php echo $module->title; ?><?php #echo $params->get('title'); #$parentName; ?></h2>
<?php
endif;
?>

以下是我的代码。 不幸的是,“show_title”无法正常工作。我做错了什么?

1个回答

3
解决方案是:
if($module->showtitle):

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接