Created
March 6, 2012 10:20
-
-
Save niklausgerber/1985555 to your computer and use it in GitHub Desktop.
Show Images
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
<img src="<?php $image = $article->images()->find('thumb.gif') ?><?php echo $image->url() ?>"> //that works | |
<img src="<?php $image = $article->images()->find('thumb.gif') ?><?php echo thumb($img, array('width' => 200), false); ?>"> //and this does not |
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
<div class="grid"> | |
<div class="row"> | |
<div class="slot-0-1"> | |
<div class="center"> | |
<a href="#"><img src="http://placehold.it/400x300"></a> //should show an image linking to the latest article. Image is called thumb.png sitting in the article folder. | |
</div> | |
</div> | |
<div class="slot-2-3"> | |
<div class="center"> | |
<a href="#"><img src="http://placehold.it/400x300"></a> //should show an image linking to the second latest article. Image is called thumb.png sitting in the article folder. | |
</div> | |
</div> | |
<div class="slot-4-5"> | |
<div class="center"> | |
<a href="#"><img src="http://placehold.it/400x300"></a> //should show an image linking to the third latest article. Image is called thumb.png sitting in the article folder. | |
</div> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment