Forums / Templates, Stylesheets, Page Layout / How to display an image on my home page?

How to display an image on my home page?

Locked

Views: 1,098

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
13 Apr 2010, 1:36 PM
#1
kayz avatar

kayz

New Zenner

Join Date:
Sep 2009
Location:
Victoria
Posts:
88
Plugin Contributions:
0

How to display an image on my home page?

I am running Zen Cart 1.3.8.

I would like to know how to add an image to my home page in the centre section.

When I first installed Zen Cart (before making any changes) the home page had a zen cart image in the centre section.

I removed it and now I can't remember what I did.

I want to place an image under the welcome text but above my define pages text.

Can any one tell me how I do this. I'm sure it's easy but I just can't remember.

Thank you in advance. :-)

13 Apr 2010, 1:49 PM
#2
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: How to display an image on my home page?

Just add something like this code before your main text in Define Pages Editor (define_main_page.php), the image linking obviously to one you upload to your server

<div align="center"><a href="http://www.zen-cart.com/index.php?main_page=page&id=16"><img src="http://www.zen-cart.com/forum/images/zc_gray/misc/big-book.png" width="605" border="0"></a></div>

If you drop that code in as a demo it should give you a good idea what you need to change

13 Apr 2010, 2:17 PM
#3
kayz avatar

kayz

New Zenner

Join Date:
Sep 2009
Location:
Victoria
Posts:
88
Plugin Contributions:
0

Re: How to display an image on my home page?

Thanks for the help.

Coding is not my forte but I got there.

Thanks again for the help. :-)

13 Apr 2010, 2:17 PM
#4
khawari avatar

khawari

New Zenner

Join Date:
Apr 2010
Posts:
1
Plugin Contributions:
0

Re: How to display an image on my home page?

twaddle is rite,
just post the html link:

<div align="center"><a href="http://www.zen-cart.com/index.php?main_page=page&id=16"><img src="http://www.zen-cart.com/forum/images/zc_gray/misc/big-book.png" width="605" border="0"></a></div>

It'll work, :D sorry i needed help too so found out here and did it thanks to twaddle.

Cheers.

Khawari
http://www.taurosmedia.com

13 Apr 2010, 2:46 PM
#5
kayz avatar

kayz

New Zenner

Join Date:
Sep 2009
Location:
Victoria
Posts:
88
Plugin Contributions:
0

Re: How to display an image on my home page?

khawari:

twaddle is rite,
just post the html link:

<div align="center"><a href="http://www.zen-cart.com/index.php?main_page=page&id=16"><img src="http://www.zen-cart.com/forum/images/zc_gray/misc/big-book.png" width="605" border="0"></a></div>

I found that I had to play around with the width size in the code a bit but now it looks really good.

20 Apr 2010, 4:25 PM
#6
kayz avatar

kayz

New Zenner

Join Date:
Sep 2009
Location:
Victoria
Posts:
88
Plugin Contributions:
0

Re: How to display an image on my home page?

Twaddle:

<div align="center"><a href="http://www.zen-cart.com/index.php?main_page=page&id=16"><img src="http://www.zen-cart.com/forum/images/zc_gray/misc/big-book.png" width="605" border="0"></a></div> ```

I moved my site so it was viable to the public and have lost my home page image.

I've played around with the code a bit but can't work out how to get it to work again.

website: https://www.passionsignite.com.au
image name: grand_opening_web_poster_copy.jpg
image location on server: public_html>images>banners

What do I need to change to get this to work again?

20 Apr 2010, 5:06 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How to display an image on my home page?

You were using an absolute URL, so when you moved your site the actual path to the image changed. It is always recommended to use relative URLs for content in your site. Also, you apparently want just an image here, not a link, so remove the link code.```

<div class="homeImage"><img src="images/banners/grand_opening_web_poster_copy.jpg" /></div> ```
20 Apr 2010, 5:22 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How to display an image on my home page?

Your particular problem was actually putting the /public_html/ in the path, but relative paths are still better, as they will automatically be appended to the correct base by Zen Cart.
<img src="http://www.passionsignite.com.au/public_html/images/banners/grand_opening_web_poster_copy.jpg"

20 Apr 2010, 6:01 PM
#9
kayz avatar

kayz

New Zenner

Join Date:
Sep 2009
Location:
Victoria
Posts:
88
Plugin Contributions:
0

Re: How to display an image on my home page?

Thank you for the information.

It's working like a charm now.

Coding is not my best subject. lol

Thanks again....