Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Joomla Module, get "Show / Hide Module Title" parameter

I'm overwriting the mod_menu default.php and want to receive the "show_title" parameter from the module option. Using 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;
?>

That's a part of my code. Unfortunately "show_title" doesn't work. What am I doing wrong?

like image 873
user3613095 Avatar asked Jun 14 '26 06:06

user3613095


1 Answers

The solution was:

if($module->showtitle):
like image 186
user3613095 Avatar answered Jun 16 '26 21:06

user3613095



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!