Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.0-rc1
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Aug 2008 at 13:25 UTC
Updated:
15 Jun 2009 at 21:00 UTC
Am I missing something or is there no argument for the updated time of a node at the moment?
Also, is there a HOWTO anywhere yet that tells you how to make your own argument? I looked at the API docs, but don't have time to pick through it right now, so if anyone knows of a "Quick Start" style guide, that would be great. =)
Comments
Comment #1
merlinofchaos commentedWhat you see is what you get in the API docs, I'm afraid.
Comment #2
greg.harveyThanks - np. The API docs are great - I'll just need to allocate more time to understanding how it works. =)
Comment #3
merlinofchaos commentedI realize i didn't answer the first question -- no there isn't an argument for updated time.
The short version for what you need to do us use hook_views_data_alter() and assign the argument handler to the 'node' table similar to how created_yearmonth works. It should take very little actual code to do this.
Comment #4
greg.harveyAs you said, this was relatively trivial to achieve. I realised, after I did it, that it didn't actually fully meet my use case, but it's a start! =)
Apologies for not creating a patch - using Microsoft TFS for source control here and it doesn't support creating patches. Anyway, here is the code to add it straight in to 'node.views.inc' (line 121) if you would like to:
Or, alternatively, replace the node.changed handlers in your own module:
I've taken the latter approach for now, to keep the Views core clean in case this is in the next release. =)
Comment #5
greg.harveyOops. Changing status.
Comment #6
merlinofchaos commentedNot quite a year later, I committed this with substantial improvement.