Integrate image_attach with Views
David Lesieur - September 26, 2006 - 04:36
| Project: | Image |
| Version: | 4.7.x-1.x-dev |
| Component: | image_attach |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
This patch allows to display attached images in Views. It can show an attached image as a simple img, or in a link to the attached image, or in a link to the node that attaches the image. Thumbnail, preview and original sizes are also supported.
| Attachment | Size |
|---|---|
| image_attach.module.patch | 2.37 KB |

#1
great!
I will test this ASAP
#2
Taking a look at this, I think that having a separate views interface for the image_attach module is not the best.
Having a single views interface for the image module would be much better.
Here is a patch which adds into the image module views interface the ability to read handle images which have been attached to a node.
#3
hadn't stripped out the image_alter() stuff.
#4
This is an interesting approach, and I like reducing the amount of code. ;-) However, I see some serious drawbacks to it:
#5
I just tested the first patch (by David) and works flawlessy for me. I don't think it's a problem to have a separate interface for attached images since, infact, they're two different modules at the moment.
Can we mark this ready to be committed?
#6
The reason that I though adding them together means that you can create your view, and include both image nodes, and nodes with images attached in the same list.
Where as you cannot do this with having the views code in the image attach module, as you have 2 fields for a view and need to use some custom theming to get them into 1.
#7
Yes, your use case is a valid one. However, my gut feeling is that it may not be the most sought after. So I suggest that we commit the original patch. ;-)
In fact, one patch does not really precludes the other, as they neither have exactly the same purpose nor do they affect the same modules.
#8
Just what I needed. I will test it out, and let you know the results.
#9
Tested and ready to be committed, i.e. the original image_attach.module.patch. ;-)
#10
I have tested the original patch, just for displaying attached images and it works without problems. As I have no use for the second patch, i did not test that.
#11
Yes, these are separate patches addressing related but distinct issues. The first is the one described in the issue title: that image_attach should expose its table to views. gordon's patch could go into a follow-up issue. It would require more discussion and review.
+1 to the first patch.
#12
committed David's patch. Thanks for the patch and the reviews! :)
#13