CoreFiles by mySites.guru
banner.php31 lines, 835 bytes, from Joomla_4.2.0-beta2-Beta-Full_Package.zip
Raw History Compare with 4.2.0-beta1
md5
5094e744eb3f0dcb7e14a41a5b6e9b5d
sha1
0414c785f805f2d19ec9cfe5b864323c54e1aa58
sha256
77239352245eef80e7b24f0af380757ead2dd666e14f9deb57af4bb4c3708cb4
<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_custom
 *
 * @copyright   (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Uri\Uri;

$modId = 'mod-custom' . $module->id;

if ($params->get('backgroundimage'))
{
	/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
	$wa = $app->getDocument()->getWebAssetManager();
	$wa->addInlineStyle('
#' . $modId . '{background-image: url("' . Uri::root(true) . '/' . HTMLHelper::_('cleanImageURL', $params->get('backgroundimage'))->url . '");}
', ['name' => $modId]);
}
?>

<div class="mod-custom custom banner-overlay" id="<?php echo $modId; ?>">
	<div class="overlay">
		<?php echo $module->content; ?>
	</div>
</div>

The same content is in 5 releases, Joomla 4.1.5-rc1 to 4.2.0-beta2. See them all, or every version of this file.