Christian Posted June 23, 2014 Share Posted June 23, 2014 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. Link to comment Share on other sites More sharing options...
Jan Romero Posted June 23, 2014 Share Posted June 23, 2014 If you want to display the images in the admin page tree, this module should be what you're looking for. Or are you asking how to render images on your site? Try <img src="<?php echo $page->MyImageField->url; ?>" />. We will be able to help you better if you explain your template setup and your goal in more detail. Link to comment Share on other sites More sharing options...
horst Posted June 23, 2014 Share Posted June 23, 2014 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: http://processwire.com/tutorials/quick-start/images/ http://processwire.com/api/fieldtypes/images/ 1 Link to comment Share on other sites More sharing options...
Christian Posted July 5, 2014 Author Share Posted July 5, 2014 Hi! Any ideas how to display image on user listing? It only display filename of the image. Link to comment Share on other sites More sharing options...
adrian Posted July 5, 2014 Share Posted July 5, 2014 I think horst's post has your answer - please show us the code you are trying and the result you are getting. Link to comment Share on other sites More sharing options...
Christian Posted July 5, 2014 Author Share Posted July 5, 2014 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? Link to comment Share on other sites More sharing options...
adrian Posted July 5, 2014 Share Posted July 5, 2014 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: Is this what you are looking to do? Link to comment Share on other sites More sharing options...
Christian Posted July 5, 2014 Author Share Posted July 5, 2014 Yup I already do what Horst (Thanks) instructed on my custom template but I can't do this on the user list. Link to comment Share on other sites More sharing options...
adrian Posted July 5, 2014 Share Posted July 5, 2014 Did you see the edit to my last post? If you don't want to run PW dev, or wait for 2.5 to be released, there is another option than Lister - you can use this excellent module from Soma: http://modules.processwire.com/modules/page-list-image-label/ Link to comment Share on other sites More sharing options...
Christian Posted July 5, 2014 Author Share Posted July 5, 2014 Hi! This is weird. I already using the latest dev release but I don't see any column tab on users. Link to comment Share on other sites More sharing options...
adrian Posted July 5, 2014 Share Posted July 5, 2014 I am guessing you are logged in as a non-superuser? If so, then you need to give your role "page-lister" permissions. Link to comment Share on other sites More sharing options...
Christian Posted July 5, 2014 Author Share Posted July 5, 2014 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 Thanks Adrian! 1 Link to comment Share on other sites More sharing options...
adrian Posted July 5, 2014 Share Posted July 5, 2014 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 !" 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