jsantari Posted April 24, 2014 Posted April 24, 2014 If I create a structure like this for photo galleries is it possible to mark an image as featured so I could select images from any of the galleries to display in a featured area? It looks like images only have one additional value the description so it seems to me that this approach won't work. /photos/gallery-1 /photos/gallery-2 /photos/gallery-3 etc. Is it possible to do it this way in PW or do I need to look at using the one page per image approach?
kongondo Posted April 24, 2014 Posted April 24, 2014 Not sure if this topic would help? https://processwire.com/talk/topic/417-extending-image-field/
Macrura Posted April 24, 2014 Posted April 24, 2014 enable tags on image field.. use tag 'featured' $images = $page->images->findTag('featured'); or get first an array of all images from the template gallery or whatever then run your findTag on that array 3
kongondo Posted April 24, 2014 Posted April 24, 2014 (edited) enable tags on image field.. use tag 'featured' $images = $page->images->findTag('featured'); or get first an array of all images from the template gallery or whatever then run your findTag on that array Aaah...Alternatively, reminds me of this thread https://processwire.com/talk/topic/3865-image-tags/ See Soma's solution (and comments) on that thread.... Something like this.. $images = $pages->get('/photos/')->children("image.tags=featured"); @Macrura, Thanks for the pointers! Edited April 24, 2014 by kongondo
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