Matrix Version: 184.108.40.206
Hello. I’ve been trying to build up a search page that lists only image assets that do not contain a value for
asset_attribute_alt, as we have quite a few images uploaded with no alt text. I searched around the forums a little and found that creating an additional metadata field and setting it to the value of the attribute should work, then I can create a search based on that. Think I’m about 90% there, but just can’t get over the last hurdle
This is my setup:
I created a fresh metadata schema that has 1 text field inside it.
I set the value of that field to
%asset_attribute_alt^empty:noalttext% – so it gets filled with ‘noalttext’ if the attribute is empty. I applied the schema just to a single image for testing.
I then created a search page and set up my search field as follows, selecting the custom metadata field I created (noted above).
On the details screen I set my root node, specified only image assets, showing the results screen immediately and then after this is pretty much where I got stuck. This is my current stored query attempt, which kind of works.
The search results from this do pull back the single image that has the schema applied, but if I update the alt attribute of that image with some text it still shows in the results rather than it not being returned. Just not sure what I need to set up on that section to pull the right results back based on my query.