Zenpage custom page: image links not working?

In my custom pages within the Zenpage theme, I have successfully added content and edited out the things I don't need.

However, when I try to link to any kind of image file, the image doesn't appear, although the alt text does. I have tried this with both JPG and PNG files - neither appear. The custom pages show this path:

http://www.mysite.com/zenphoto/page/mynewpage

And the broken image shows this path:

http://www.mysite.com/zenphoto/page/images/someimage.jpg

The image files are definitely there, in that folder. I have tried to change the location of the images to the same folder as the custom pages - same result.

Why do they not display? Is the problem in how the path to the images is specified?

Comments

  • acrylian Administrator, Developer
    So these are custom theme pages or Zenpage plugin pages?

    What kind of images are those? Theme based? Zenphoto managed ones?
  • os07 Member
    I just took the archive.php page and made some changes, saved it as mypage.php, same folder: /zenpage

    The images are not part of ZP, nor are they part of the theme. They're just one or two images per custom page that do not occur anywhere else, and are not in any ZP gallery or album.
  • acrylian Administrator, Developer
    So and where are these images from, where are they located???
  • os07 Member
    I can place them wherever I need to. They are generally small graphic files, PNG, and one or two small JPGs. The illustrate some of the points made in the text on the custom pages.
  • acrylian Administrator, Developer
    Again, if the images don't show up, the urls to them are wrong. So where are they if not part of the theme and not managed by Zenphoto?
  • os07 Member
    I have traced this to a path problem, and have used the PHP code provided by ZP to specify the image path properly; problem solved!

    To specify the image folder within any theme without having to use the entire long URL as path, the correct method is:

    <img src="<?php echo $_zp_themeroot; ?>/images/myimage.jpg" />
  • acrylian Administrator, Developer
    So they are theme based....You could have had this answer earlier if you had answered my questions above....
  • os07 Member
    Sorry for the confusion, my mistake. I guess I was assuming that theme-based images meant that they would be included in all theme pages.
Sign In or Register to comment.