Thread: URL to an Image

Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2007
    Posts
    8
    Plugin Contributions
    0

    Default URL to an Image

    Hi everyone, i am fairly new to using zencart and have been playing around with a bit of customisation. I have created my own template and have moved the header search button to below a series of navigation buttons. (sorry not live so cannot link). what I now want to do is enlclose this in a box with a rounded left and right bottom corner. I tired with DIV's initially but understand that a div effectively takes the full width of the page (well at least I had probelms doing it this way) So have opted for putting it all in a three cell table with the header search being in the center cell and the images being in the left/right cells. My problem is that i cannot figure out the url to the image.

    The images are stored in

    mytemplate\images\imagename

    I have tried

    <img src="images\imagename">
    <img src="\images\imagename">
    <img src="..\images\imagename">

    but nothing seems to work. Appreciate any feedback on this or suggestions on better ways to do this. If anyone wants to see the actual code just let me know.

    Thanks in advance

    Ian

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,684
    Plugin Contributions
    11

    Default Re: URL to an Image

    The cart looks in the basic images file folder for other than the specific logo, etc.
    try moving the images to the main images folder. If you have a unique name for them, they will not be overwritten on upgrade and you can use the ../images/filename format for the image URL. Otherwise you'll have to set a relative url to the ......./mytemplate/images/filename
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  3. #3
    Join Date
    Jul 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: URL to an Image

    Thanks Dbltoe. How would I set a relative url or is there another way. One of the things I am looking to achieve is portability of the template. If i could keep all images within the actual template folder I can very easily just copy the entire mytemplate directory.

  4. #4
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: URL to an Image

    If i could keep all images within the actual template folder I can very easily just copy the entire mytemplate directory.
    You should always put your template related images in the image directory for your template.

    The relative address for them will depend on how you are calling the image.

    From the CSS of your custom template with the images in your template's image directory the relative is: ../images/YOUR_PIC.gif
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  5. #5
    Join Date
    Jul 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: URL to an Image

    Kim thanks for the reply. This is exactly what I want to do i.e keep all the images local to my custom template folder. And I have used the ..\images\customtemplate path in my css where I make use of background images. The problem I am faced with however was needing to call the image directly from the file customtemplate\templates\tpl_modules_categories_tabs

    hope this makes sense

  6. #6
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: URL to an Image

    The problem I am faced with however was needing to call the image directly from the file customtemplate\templates\tpl_modules_categories_ta bs
    Why are you thinking you need to call the image from that file?
    Last edited by Kim; 15 Jul 2007 at 11:06 PM.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  7. #7
    Join Date
    Jul 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: URL to an Image

    Hi Kim,

    well basically i have modified the css to give me nice rounded tabs for my category tabs (similar to amazon) directly beneath this I have moved the search header box. I want to put nice rounded corners on this so the whole thing forms a bubble. I have attached a very rough diagram of what I am trying to achieve hope it makes sense if you visualise squeezing the gaps together.

    essentially i tried playing with Div's but didnt get very far as i either need three div's (could not get fromatted correctly) or one to hold the header search and two background images for the corners.(dont think that can be done) so my way of thinking now is to have a table with one row and three cells the search stuff goes in the center cell and the corner images in the left and right cell respectively.

    Hope i have made that clear, I have re-read it twice and it still seems a little garbled but im not sure how else to word it.

    Thanks

    Ian
    Attached Images Attached Images  

  8. #8
    Join Date
    Jul 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: URL to an Image

    Hate to try bumping this, but I am still struggling with this one and was wondering if anyone has any further thoughts.

    Thanks

 

 

Similar Threads

  1. Pulling image from URL
    By Hollywood691 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 10 Dec 2011, 06:46 PM
  2. Additional image url
    By Dan123 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 24 Oct 2011, 07:53 PM
  3. image url for products.
    By timdwyer42 in forum General Questions
    Replies: 2
    Last Post: 14 Jun 2009, 05:43 PM
  4. Adding an image to the URL
    By Allenn in forum General Questions
    Replies: 10
    Last Post: 22 Jul 2008, 02:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg