Hi,
I'm doing a content override.
I need to use the intro image in the masthead.
In the override there is this code:
<?php
/**
T4 Overide
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
//use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use T4\Helper\J3J4;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
// Create shortcuts to some parameters.
$params = $this->item->params;
$images = json_decode($this->item->images);
$urls = json_decode($this->item->urls);
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$document = JFactory::getDocument();
$imageBg = $images->image_intro;
$templateSettings = JFactory::getApplication()->getTemplate(true)->params;
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$jcFields = \Joomla\Utilities\ArrayHelper::pivot($this->item->jcfields , 'name');
// put heading to masthead
if ($document->countModules('masthead') || !$this->print || $tmpl !== 'component') {
$masthead = JLayoutHelper::render('joomla.content.masthead', array('params' => $this->params, 'title' => $this->escape($this->item->title), 'item' => $this->item, 'print' => $this->print, 'templateSettings' => $templateSettings, 'params' => $params, 'imageBg' => $imageBg));
$document->setBuffer($masthead, array('type' => 'modules', 'name' => 'masthead', 'title' => ''));
}
?>
But the image doesn't appear, the masthead use the default image