Hi,
I'm creating a module for my component and thought I would use the JDom to call up an image.
I'm using this as document page as a guide...
www.j-cook.pro/index.php/m/module
My component is called com_organicshop. My image field is "main_image".
In my module default.php I have...
// Set up the component for JDom
$dom = JDom::getInstance();
$dom->set('extension', 'com_organicshop');
Is the "extension" bitcorrect?
Also
<?php // Item Image
echo JDom::_('html.fly.file', array(
// Furnish the image relative path
'dataValue' => $item->main_image,
// Define as indirect, with the root directory alias
'root' => '[DIR_FILES_MAIN_IMAGE]',
'indirect' => true,
// Some options for Thumb creation
'height' => 50,
'width' => 50,
'attrs' => array('center','crop','fit'),
));?>
But the JDom isn't showing the image - it is not rendering. Instead I'm getting this output...
<img src="/index.php?option=com_organicshop&task=file&size=50x50&attrs=center:1,crop:1,fit:1&path=[DIR_FILES_MAIN_IMAGE]/shoelaces.jpg">
Any ideas?