Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I make an image a hyperlink?


Guest

Recommended Posts

It depends on where the image is. If you want to add an image, then you need to edit the index.php in /languages/english to add your html.

 

We added a graphic menu on our index page to compliment the Categories box. It is at www.justpillows.com.

 

Take a look.

 

If you are trying to do an image in the header or footer, you'll need to edit those file accordingly.

 

Hope that helps.

Soft, elegant, yet suprisingly affordable

Link to comment
Share on other sites

The html code for making an image a link is:

 

<a href="your link here"><img src="your image path here" border=0></a>

 

If you want it to open in a new window, make it:

 

<a href="your link here" target=blank><img src="your image path here" border=0></a>

Link to comment
Share on other sites

In order to transport the session id on the URL (which is needed if people do not support cookies) you should use the in-house tep_href_link function:

 

echo '<a href="' . tep_href_link(DEFINED_FILENAME, '', 'NONSSL') . '"> .... </a>';

 

The DEFINED_FILENAME is something you should (or can) define in catalog/includes/filenames.php - or you could use the path and realname between single quotes: 'myfile.php'

 

Regards

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...