Created
May 10, 2012 04:56
-
-
Save emersonsoares/2651106 to your computer and use it in GitHub Desktop.
CakePHP – ThumbnailHelper, um gerador de miniaturas com cache dinamico
This file contains 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
<?php | |
//Declaro o uso do helper na AppController | |
public $helpers = array('Html', 'Thumbnail'); | |
//Exemplo de uso na view | |
echo $this->Html->image('myimage.jpg', array( | |
'path' => 'uploads/Model/picturefield', | |
'newWidth' => '250', | |
'newHeight' => '150', | |
'resizeOption' => 'portrait', | |
'quality' => '100' | |
) | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment