Core::make('html/image', array(File::getByID($item['fID'])))->getTag() question
Permalink 1 user found helpful
Hello!
I'm create custom block type.
In form.php (for edit.php and add.php) i write and i get code:
And all right. That's what i need.
But if I write the same code in controller.php i get
The same function is performed differently. (form.php and view.php vs controller.php)
My controller.php start code
and view и edit assets:
$this->requireAsset('core/file-manager');
I'm create custom block type.
In form.php (for edit.php and add.php) i write and i get code:
<picture><!--[if IE 9]><video style='display: none;'><![endif]--><!--[if IE 9]></video><![endif]--><img src="URL_TO_IMAGE" alt="#"></picture>
And all right. That's what i need.
But if I write the same code in controller.php i get
<img src="URL_TO_IMAGE" alt="2.jpg" width="1440" height="900">
The same function is performed differently. (form.php and view.php vs controller.php)
My controller.php start code
<?php namespace Application\Block\Amgallery; use Concrete\Core\Block\BlockController; use Loader; use Core; use Database; use File; use Image; use Concrete\Core\Editor\LinkAbstractor; defined('C5_EXECUTE') or die(_("Access Denied.")); class Controller extends BlockController { protected $btTable = "btAmgallery"; protected $btInterfaceWidth = "350"; protected $btInterfaceHeight = "290";
Viewing 15 lines of 18 lines. View entire code block.
and view и edit assets:
$this->requireAsset('core/file-manager');
@antonovsky
What is the full code in your controller?
What is the full code in your controller?
https://github.com/antonovsky/amgallery/blob/master/amgallery/controller.php
@antonovsky
As hissy mentioned, do you have getThemeResponsiveImageMap() in your page_theme.php?
Example:
https://github.com/concrete5/concrete5/blob/develop/web/concrete/the...
As hissy mentioned, do you have getThemeResponsiveImageMap() in your page_theme.php?
Example:
https://github.com/concrete5/concrete5/blob/develop/web/concrete/the...
I do not know. I think it has. I use a basic theme of concrete 5. Elemental. Last version of concrete5. Concrete5 is installed without demo data.
Please help me. I have getThemeResponsiveImageMap in Elemental theme.
Your theme should support responsive image map. See:
http://documentation.concrete5.org/developers/designing-for-concret...
http://documentation.concrete5.org/developers/designing-for-concret...
What is the code you are using to generate the image in your controller file? In the html/image service, the second parameter is an array. You may be passing false as the second element in this array.
Example: make a picture tag
Example: make an img tag using false
http://documentation.concrete5.org/api/class-Concrete.Core.Html.Ima...