Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • cherryred Friend
    #967277

    In order to use the backround parameter I understand I have to copy and paste this code

    <div class="jamasshead" <?php if(isset($masshead[‘params’][‘background’])): ?> style="background-image: url(<?php echo $masshead[‘params’][‘background’] ?>)" <?php endif; ?>>

    to the masshead module file default.php which (if I have identified it correctly) has important content like this

    defined( ‘_JEXEC’ ) or die( ‘Restricted access’ );
    require_once (dirname(FILE).’/helper.php’);
    $helper = ModJAMassheadHelper::getInstance();
    // Get masshead information
    $masshead = $helper->getMasshead($params);
    // Display
    require JModuleHelper::getLayoutPath($module->module, $params->get(‘layout’, ‘default’));

    I don’t understand whereabouts to insert the extra code, have tried a few places and website crashes. Please what I am doing wrong. Sorry can’t post link, am developing site locally.

    pavit Moderator
    #967351

    Hi

    Your default.php file should be like the one below

    <?php
    /**
     * ------------------------------------------------------------------------
     * JA Directory Template
     * ------------------------------------------------------------------------
     * Copyright (C) 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
     * @license - Copyrighted Commercial Software
     * Author: J.O.O.M Solutions Co., Ltd
     * Websites:  http://www.joomlart.com -  http://www.joomlancers.com
     * This file may not be redistributed in whole or significant part.
     * ------------------------------------------------------------------------
     */
    
    defined('_JEXEC') or die('Restricted access');
    
    $background = "";
    if(isset($masshead['params']['background'])) {
      $background = $masshead['params']['background'];
    } else {
      $background = "images/joomlart/bg-masthead.jpg"; 
    }
    ?>
    <div class="jamasshead<?php echo $params->get('moduleclass_sfx','')?>" style="background-image: url(<?php echo $background ?>)" >
        <h3 class="jamasshead-title"><?php echo $masshead['title']; ?></h3>
        <div class="jamasshead-description"><?php echo $masshead['description']; ?></div>
    </div>  
Viewing 2 posts - 1 through 2 (of 2 total)

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

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