Jump to content

Recommended Posts

Posted

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.

Posted

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? 

  • Like 1
Posted

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.

Posted
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.

  • Like 1
Posted

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. :)

Posted

I wasn't sure but after checking I can say that AOS supports additional fields added by Image Extra module :)

  • Like 2
  • Haha 1
Posted

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.

Posted

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.

Posted

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. 

  • Like 1

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...