Manaus Posted March 15, 2016 Share Posted March 15, 2016 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 More sharing options...
LostKobrakai Posted March 15, 2016 Share Posted March 15, 2016 The ->url should get you the full – relative to root folder – url to the image. Link to comment Share on other sites More sharing options...
Soma Posted March 15, 2016 Share Posted March 15, 2016 $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. 5 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now