I am trying to display an image on a Joomla2.5+Virtumart2 site. I know only the virtuemart_media_id of this pic and found that function online displayImage($virtuemart_media_id,$key) but struggle to display the pics.
Here is my code. I have controlled that $this->category->virtuemart_media_id contains at least one value.
if ($this->category->virtuemart_media_id) {
foreach ($this->category->virtuemart_media_id as $catimg) {
echo $catimg->displayImage("");
}
}
I do not understand what's the $key for. Here the code of the function: http://docs.virtuemart.net/api-vm2/db/d4c/mediahandler_8php_source.html#l01012
what view are u trying to do this in?
IMHO displayImage() is only for the admin - it needs an image object and it returns hidden form elements as well