Jump to content

Recommended Posts

Posted

I added some custom menu on user fields including the image. I set it to display on user list but it only display image name. 

Posted

Try <img src="<?php echo $page->MyImageField->url; ?>" />.

@JanRomero: It's really nice that you help, - but your example isn't correct, at least for fields with multiple images, what is the default. Your example only works if the image field is set to accept only _one_ image, and not _multiple_. With multiple imagesfield, you need to specify the image you want to use, e.g.:

$page->images->first()->url
$page->images->last()->url
$page->images->eq(0)->url  // is the first image
$page->images->eq(1)->url  // is the second image

etc.

have a look at:

  • Like 1
  • 2 weeks later...
Posted

I think horst's post has your answer - please show us the code you are trying and the result you are getting.

Posted

Hi Arian, I'm not trying to put any custom template with this. I just defined picture field on my user and add some field on my table and it only display image name on /access/users/. Do I need to define or override a processwire template to do this?

Posted

Oh I think I understand - do you want the user's image to show up when viewing the User list through the admin panel - Access > Users ?

EDIT: If you're running the dev version of PW, that is really easy to do now that the Users page uses Lister - just choose the image field from the columns tab. Like this:

post-985-0-22420400-1404575186_thumb.jpg

Is this what you are looking to do?

Posted

I am guessing you are logged in as a non-superuser? If so, then you need to give your role "page-lister" permissions.

Posted

Image successfully shown! My problem is I didn't check the module so it's not shown on the module list. Such a dumb mistake :P Thanks Adrian!

  • Like 1
Posted

I'll post the same answer I posted in response to your Lister thread issue, just in case someone else is confused.

"Ah - I guess you must have upgraded a 2.4 stable installation to dev - that is why Lister wasn't installed by default !"

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
  • Recently Browsing   0 members

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