Finding information about fields in Drupal Views
-
07-07-2019 - |
Question
I have a node type with multiple file attachments and would like a node view to show the latest file attached to the node.
In Views, I have options to sort by node:updated or revision:vid, but of course they don't tell me which file was added last. Is there a way to sort by the updated time of a field?
And, more generally, is there a way to find information about changes to parts of a node.
Solution
There is no revision records for individual CCK fields that I've ever heard of. I think I saw a blog entry about someone thinking of writing a module for it.
Here's how you get the file upload date into a View:
- Create a Relationship with the particular FileField you are interested in.
- In Fields there will now be a File category. It includes
File Upload Date
. - In Sort criteria there is also a
File Upload Date
.
If you also restrict your View to a single node, that should do it.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow