JHTMLImage Problem
Posted: Wed Feb 13, 2008 8:21 am
Hi, guys
May I know what's the proper way to use JHTMLImage? The wiki reference is a bit confusing.
One of the example is with the following code:
and the output is:
well, let's say if I have an image called 'hulloworld.gif' and it's located at 'joomla_root/images/hullo/', currently I have to use the following code to get the following output:
output:
Is there a way to make this easier? like reduce the parameters like 'edit.png', '/images/M_images/', when I try to leave these parameters empty, the whole function simply won't work.
Thanks in advance!
May I know what's the proper way to use JHTMLImage? The wiki reference is a bit confusing.
One of the example is with the following code:
Code: Select all
echo JHTML::_( 'image.site', 'edit.png', '/images/M_images/', 'save.png', '/images/', 'Save' );
and the output is:
Code: Select all
<img src="images/save.png" alt="Save" align="top" border="0" />
well, let's say if I have an image called 'hulloworld.gif' and it's located at 'joomla_root/images/hullo/', currently I have to use the following code to get the following output:
Code: Select all
echo JHTML::_( 'image.site', 'edit.png', '/images/M_images/', 'hulloworld.gif', '/images/hullo/', 'hullo world');
output:
Code: Select all
<img src="images/hullo/'hulloworld.gif" alt="hullo world" align="top" border="0" />
Is there a way to make this easier? like reduce the parameters like 'edit.png', '/images/M_images/', when I try to leave these parameters empty, the whole function simply won't work.
Thanks in advance!