Jump to content

image->url path and image real url


Manaus
 Share

Recommended Posts

Hello,

I noticed that for geting the image right url I have to print two values

<? foreach ($page->children as $child): ?>
  <img src="<?php echo $child->image->url, $child->image ?>" alt="" />
<? endforeach ?>

Is this the normal usage, or am I skipping some important part?

Thanks!

Link to comment
Share on other sites

$child->image->url

If this only does give you the path to the folder, your image field is multiple and not a single image field.

If you change your field to only allow 1 image, then this would give you the full url to the image.

  • Like 5
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...