Jump to content

How do show full path of image on template plus different sizes


OpenBayou
 Share

Recommended Posts

Hey everyone,

I'm new at using ProcessWire and starting to get a better understanding at how this works (and enjoying what I see). However, I'm having problems with displaying images on my theme. The field is called 'Image' and I'm looking for ways to display the URL to the image attached to the page.

This is the code I have so far:

<?php foreach($pages->find("parent=recommendations") as $child) { ?>
	<?php echo $child->title;?>
<?php } ?>

First thing I'm having problems with is displaying the image. If I do `<?php echo $child->Image;?>' it just shows the filename.jpg. If I do '<?php echo $child->Image->url;?>`, it just shows the directory (/site/assets/files/1110/). First question is i'm looking for a way to display the full path of the image.

Second question I have is how do you show different sizes of the image.

Thanks and happy new year.

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...