[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/templates/cassiopeia/html/mod_custom/ -> banner.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  mod_custom
   6   *
   7   * @copyright   (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9   */
  10  
  11  defined('_JEXEC') or die;
  12  
  13  use Joomla\CMS\HTML\HTMLHelper;
  14  use Joomla\CMS\Uri\Uri;
  15  
  16  $modId = 'mod-custom' . $module->id;
  17  
  18  if ($params->get('backgroundimage')) {
  19      /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
  20      $wa = $app->getDocument()->getWebAssetManager();
  21      $wa->addInlineStyle('
  22  #' . $modId . '{background-image: url("' . Uri::root(true) . '/' . HTMLHelper::_('cleanImageURL', $params->get('backgroundimage'))->url . '");}
  23  ', ['name' => $modId]);
  24  }
  25  ?>
  26  
  27  <div class="mod-custom custom banner-overlay" id="<?php echo $modId; ?>">
  28      <div class="overlay">
  29          <?php echo $module->content; ?>
  30      </div>
  31  </div>


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer