Page List block - "Core::make('html/image', array($thumbnail))"1 user found helpful
In page block deafult (lines 99-104). This code add the thumbnail attribute to the page list view.
// code 1. <?php 100 $img = Core::make('html/image', array($thumbnail)); 101 $tag = $img->getTag(); 102 $tag->addClass(img-responsive'); 103 print $tag; ?>
In the same file - comment guide say "HOW TO USE IMAGE ATTRIBUTES:"
//code 2 72 * HOW TO USE IMAGE ATTRIBUTES: 73 * 1) Uncomment the "$ih = Loader::helper('image');" line up top. 74 * 2) Put in some code here like the following 2 lines: ....the rest of the php file
What the difference between this codes ?
Two of them work for me - but i dont understand option 1 concept (its not use helper - so what is it? )
The code in the first example creates a responsive picture element. The code in the second example is used to create an img element, with an image that can be resized or cropped to a specific size.
Each approach has its benefits and will depend on what you are trying to accomplish.
Should be now: