Skip to content

Commit

Permalink
Issues techjoomla#161 chore: Adding image layout to render an image
Browse files Browse the repository at this point in the history
  • Loading branch information
punambaravkar committed Jul 24, 2019
1 parent b3fe946 commit 829eddb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions site/layouts/fields/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@
$tjFieldHelper = new TjfieldsHelper;
$mediaLink = $tjFieldHelper->getMediaUrl($field->value, $extraParamArray);
?>

<img src="<?php echo $mediaLink; ?>" height="<?php echo $field->element->attributes()->height;?>" width="<?php $field->element->attributes()->width;?>" />
<a href="<?php echo $mediaLink;?>" class="btn btn-success">
<?php echo JText::_("COM_TJFIELDS_FILE_DOWNLOAD");?></a>
<div>
<img src="<?php echo $mediaLink; ?>" height="<?php echo $field->element->attributes()->height;?>" width="<?php $field->element->attributes()->width;?>" />
<a href="<?php echo $mediaLink;?>" class="btn btn-success">
<?php echo JText::_("COM_TJFIELDS_FILE_DOWNLOAD");?></a>
</div>
<?php
}
else
Expand Down

0 comments on commit 829eddb

Please sign in to comment.