test
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • matteo sitta Friend
    #940264

    Hello!
    In the Home page the module title is disabled by "modChrome_T3Section"
    I need a solution to show the title and intro text like the module called "Speakers Include" but inside a html custom module
    thanks!
    Matteo

    Ninja Lead Moderator
    #940314

    Hi,

    My solution below will help you to add the title module to modChrome_T3Section

    Open templates/ja_events_ii/html/modules.php file and replace modChrome_T3Section function with my code

    function modChrome_T3Section($module, &$params, &$attribs) { 
        $badge          = preg_match ('/badge/', $params->get('moduleclass_sfx'))? '<span class="badge"> </span>' : '';
        $moduleTag      = htmlspecialchars($params->get('module_tag', 'section'));
        $headerTag      = htmlspecialchars($params->get('header_tag', 'h3'));
        $headerClass    = $params->get('header_class');
        $bootstrapSize  = $params->get('bootstrap_size');
        $moduleClass    = !empty($bootstrapSize) ? ' col-sm-' . (int) $bootstrapSize . '' : '';
        $moduleClassSfx = htmlspecialchars($params->get('moduleclass_sfx'));
        $fullWidth          = $params->get('module-full-width','0');
        $moduleIntro    = $params->get('module-intro','');
        $bgImage        = $params->get('module-background','');
      $bgImageSize    = 'cover';
      $bgImagePo      = 'center center';
      $moduleBg       = $bgImage ? 'style="background-image: url(' . JUri::base(true) . '/' . $bgImage . '); background-repeat: no-repeat; background-position: '.$bgImagePo.'; background-size: '.$bgImageSize.'"' : '';
      if($bgImage) $moduleClass = $moduleClass.' t3-section-bg'; 
        if (!empty ($module->content)) {
            $html = "<{$moduleTag} class=\"wrap t3-section {$moduleClassSfx} {$moduleClass} \" id=\"Mod{$module->id}\" {$moduleBg} >";
    
            if (strpos("mod_ja_acm",$module->module)===false) {
                if ($module->showtitle != 0) {
                    $html .= "<{$headerTag} class=\"module-title {$headerClass}\"><span>{$module->title}</span></{$headerTag}>";  
                }
            }
    
            if(!$fullWidth) {
                $html .= "<div class=\"container\">";
            }           
    
            $html .= $badge;
    
            $html .= "<div class=\"section-inner\">{$module->content}</div>";
    
            if(!$fullWidth) {
                $html .= "</div>";
            }   
    
            $html .= "</{$moduleTag}>";
    
            echo $html;
        }
    }

    Hope it helps

    Regards

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 1 reply, has 2 voices, and was last updated by  Ninja Lead 8 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum