Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CB9TOIIIA/639b00704180845e0e09 to your computer and use it in GitHub Desktop.
Save CB9TOIIIA/639b00704180845e0e09 to your computer and use it in GitHub Desktop.
JBImage - передать значения height и width
$zoo = App::getInstance('zoo');
$element = $item->getElement('aaccae40-ef6b-479c-8a2f-9f344d94d8a7');
$data = (array)$element->data();
$pathtoimgjbimage = $data[0]['file'];
$width = '380';
$height = '250';
$thumbInfo = $zoo->jbimage->resize($pathtoimgjbimage, $width, $height);
// echo "<pre>";
// print_r($thumbInfo);
// echo "</pre>";
$catimgjbimage = $thumbInfo->origUrl;
// echo $catimgjbimage;
$fullurl = JRoute::_($this->app->route->item($this->_item, false), false, 2);
?>
<div class="teaserimage">
<?php if ($this->checkPosition('image')) : ?>
<div class="image align-<?php echo $imageAlign; ?>">
<a href="<?php echo $fullurl; ?>">
<img class="jbimage" src="/<?php echo $catimgjbimage; ?>" data-template="itemlink"></a>
</div>
<?php endif; ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment