Created
March 2, 2016 11:22
-
-
Save CB9TOIIIA/639b00704180845e0e09 to your computer and use it in GitHub Desktop.
JBImage - передать значения height и width
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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