I want to create a custom layout for the detail page of an event where the main image is always 100% width and the same height, wether the original image is landscape or portrait.
In my previous site / component I had a template override Joomla. I had the image as a background in a div, with an option to click on the dic and show the full image in a modal window. The dic would be there only if there was an image. (Preventing a large empty space if there's no image) The code I had was this:
How can I achieve the same with custom layouts?
In my previous site / component I had a template override Joomla. I had the image as a background in a div, with an option to click on the dic and show the full image in a modal window. The dic would be there only if there was an image. (Preventing a large empty space if there's no image) The code I had was this:
<?php if ($this->dimage[original]) : ?>
<div class="headerimg">
<a href="/<?php echo $this->dimage[original]; ?>" class="modal" rel="{handler: 'image'}">
<img src = "/<?php echo $this->dimage[original]; ?>" itemprop="image" width="100%" max-height="100%" style="margin-bottom:10px; cursor: zoom-in;"><span class="zoom"><i class="uk-icon-search"></i></span>
</a>
</div>
<?php endif ?>
How can I achieve the same with custom layouts?