ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Images only showing in index template

July 17, 2014 8:30pm

Subscribe [2]
  • #1 / Jul 17, 2014 8:30pm

    garyb

    23 posts

    My template images are only showing in the index template. The   Javascript was doing the same until I added {site_url} to the path.  I tried that with the images and they show in view rendered Template but not on the live site page. What am I doing wrong?

    TIA
    Gary

  • #2 / Jul 18, 2014 10:08am

    Giraffentoast

    152 posts

    Your paths are most probably wrong.

    Use absolute paths and link to your images like this:

    /images/layout/image.jpg

    Other than that: you need to provide us with some information about what you’re doing, what your image tags look like, what you mean by “view rendered Template” and “live site page” and so on.

  • #3 / Jul 18, 2014 11:50am

    garyb

    23 posts

    One of my images tag

    images/topbg4.jpg

    It works fine in the index/home template and the image/ path work fine in the CSS on all templates. On all the other page templates the image path and the Javascript path is not working. Adding

    {site_url}

      fixed the JS problem.

    I tried that on the image tags and they show up in the View Rendered Template but not in the live page.

  • #4 / Jul 18, 2014 12:06pm

    Giraffentoast

    152 posts

    Alright, think about it. It works on Home, it doesnt work on, say, Contact.
    Why? What’s the difference between those pages?

    Even though you still didn’t tell me the exact URLs, I’d guess you’re using something like http://www.example.com (Home) and http://www.example.com/contact/ (Contact).

    And since you’re using RELATIVE PATHS in your image tags, no absolute paths like the one I posted above, the paths will stop working on any page located OUTSIDE your website root.

    Please try what I posted up there and let me know if it worked.

  • #5 / Jul 18, 2014 1:54pm

    garyb

    23 posts

    I have tried every type of path.  The absolute paths show like I said in View Rendered Template but not in live site. On live site(test Server) the source path is back to images/imagename.jpg.  All templates are in the same group. I have never had a problem like this in EE before.

  • #6 / Jul 21, 2014 4:21am

    Giraffentoast

    152 posts

    Okay, let’s try this again. 😊

    Please post your full image tag and the URLs to the pages it’s used on (home, ...).

  • #7 / Jul 21, 2014 12:34pm

    garyb

    23 posts

    I solved the problem. I did a reinstall and everything works fine. Thanks for your help 😊 I guess you missed the solved at the top of the thread.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases