mobility Posted October 20, 2014 Share Posted October 20, 2014 Sorry for the newby question, but how do I add the ability to put multiple images into a template? I go in and edit the template and it will let me add one image, but not a second or third, etc. The option becomes faded out and not selectable. Thanks in advance! Link to comment Share on other sites More sharing options...
Fokke Posted October 20, 2014 Share Posted October 20, 2014 Are you trying to add the same field multiple times? If you need multiple image fields in the same template, you need to create more fields. Link to comment Share on other sites More sharing options...
Mike Rockett Posted October 20, 2014 Share Posted October 20, 2014 Or just use Repeaters... Yes? Link to comment Share on other sites More sharing options...
Craig Posted October 20, 2014 Share Posted October 20, 2014 Do you really want to have multiple image fields; or do you just want the ability to add multiple images to the same image field? The image fieldtype in ProcessWire supports multiple images - you just need to tell it so, when you go to Setup > Fields. A template can only have one occurrence of a field added to it. If you want more - you can either create multiple fields of the same type and settings but different names, or use repeaters. Have you read over the Images section of the documentation? It might help narrow down what you want to achieve. 4 Link to comment Share on other sites More sharing options...
mobility Posted October 21, 2014 Author Share Posted October 21, 2014 Thanks all. I think the setup > fields is probably what I am looking for. I am just very new to processwire and will definitely read the documentation on images. Does allowing multiple uploads in this manner allow for tagging the images to use in different places on the page? Link to comment Share on other sites More sharing options...
adrian Posted October 21, 2014 Share Posted October 21, 2014 Yes, you can call $pages->imagefield->first()->url or $pages->imagefield->eq(n)->url in separate spots in your template, but that doesn't mean it is easiest in all situations. Typically using one images field with support for multiple images is good for sliders/carousels and image galleries, and for insertion into body text, but if you are talking about wanting to add a specific sidebar image and a main article image or similar setup, I would go with two separate image fields set to support only one image. It really depends on your scenario and what works best for you and your clients. 1 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