Jump to content

Adding an image in viewprod.tpl


Guest bassyard

Recommended Posts

Guest bassyard

Does anyone have an idea what relative link I have to use for an image inside viewprod.tpl ? I used a static link for now but I don't want to change all the links if I move it from my testserver to the real server...

Link to comment
Share on other sites

  • 2 weeks later...

relative = images/image.jpg

static = $ttp://www.mydomain.com/images/image.jpg

If you are using a test server, even on your home pc, you can always use relative links as long as you set up your test server like the real store.

I have set up my directory the same as my real store and can transfer files back and forth between the two without changing anything.

Another way of using this is to add "$site_url" in front of each link you create i.e.:

<img src=\"$site_url/images/image.jpg\">

$site_url is the url you set up in the settings section of your admin panel.

Link to comment
Share on other sites

Guest twisted

The relative link would simply be images/uploads/imagename.jpg, [or images/general, or images/logos, whereever you have the image] as viewProd.tpl would be called to the storefront, and the images directory, relative to that, is simply images/, then the subdirectory

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...