WebMaster Posted February 9, 2018 Share Posted February 9, 2018 Hello, I need to add additional attributes to Image field. For my situation not enough description and tags attributes. For example, I need to enter additional options for positioning individual images thumbnails on images gallery. It's is way to extend Image field? Or I have use other way to solve this problem? I tried to use ImageExtra field, but this field is very simple and I cant use processwire features like images files sort. Link to comment Share on other sites More sharing options...
Zeka Posted February 9, 2018 Share Posted February 9, 2018 Hi @WebMaster As far as I know, current only ImageExtra module adds support for additional fields for images. Native support for additional properties in image/files fields is on the roadmap for 2018. For now, the most flexible route for you is to create a page for every image, in that way you will get all PW features. There is module that can help with this approach https://github.com/mr-fan/AutoImagePages 14 minutes ago, WebMaster said: I cant use processwire features like images files sort. Do you mean that you can't sort and search by custom ImageExtra fields? 1 Link to comment Share on other sites More sharing options...
WebMaster Posted February 9, 2018 Author Share Posted February 9, 2018 I mean that I can't sort by uploaded filename. I use InputfieldFileSort module for sorting. This module dont works with field ImageExtra. AutoImagePages is not for my situation. I have news page with everyday photos collections insertions. Link to comment Share on other sites More sharing options...
dragan Posted February 10, 2018 Share Posted February 10, 2018 14 hours ago, WebMaster said: For example, I need to enter additional options for positioning individual images thumbnails on images gallery Can you describe in more detail what this means? Why can't you use tags for this? Sorting by filename is trivial "out of the box" with PW: $imgs = $page->images; foreach($imgs as $img) { $imageFileNames[] = $img->name; } sort($imageFileNames); echo '<pre>'; print_r($imageFileNames); echo '</pre>'; (assuming you need sorting in the frontend output). If you would add tags and / or descriptions you could build an associative array instead. 1 Link to comment Share on other sites More sharing options...
horst Posted February 10, 2018 Share Posted February 10, 2018 Maybe you can use the the imagesExtra module, drop your sorting-module and install AOS (Admin On Steroids). WIth AOS you can add filter and searchboxes to images fields, what makes it very conveniant to find images with specific strings. So, I'm not sure if that search/filterfield includes all imagesExtra fields by default. But a quick question to @tpr will shed some light, I hope. Link to comment Share on other sites More sharing options...
tpr Posted February 10, 2018 Share Posted February 10, 2018 I wasn't sure but after checking I can say that AOS supports additional fields added by Image Extra module 2 1 Link to comment Share on other sites More sharing options...
WebMaster Posted February 11, 2018 Author Share Posted February 11, 2018 I want use tags field for other purpose. It would be fine that processwire let’s extends image field (and others) for additional attributes input from admin gui. Link to comment Share on other sites More sharing options...
horst Posted February 12, 2018 Share Posted February 12, 2018 ImageExtra works together with AOS. This way you can add all fields you need and has the ability to filter and sort. No need for othet modules. Link to comment Share on other sites More sharing options...
tpr Posted February 12, 2018 Share Posted February 12, 2018 I think @WebMaster is looking for a way to sort (order) items and not to filter them. There is a solution by @bernhard that is not merged into aos, you can find it somewhere in this topic too. 1 Link to comment Share on other sites More sharing options...
bernhard Posted February 12, 2018 Share Posted February 12, 2018 On 9.2.2018 at 7:26 PM, WebMaster said: I use InputfieldFileSort module for sorting. @tpr seems he is already using it 1 Link to comment Share on other sites More sharing options...
tpr Posted February 12, 2018 Share Posted February 12, 2018 Ok, thanks for InputfieldFileSorting this out ☺️ 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