any suggestions for a complex Views sort?
Fellow Developers, Any suggestions for how to sort a View when: 1) The View is a listing of "Active Projects", where each item in the View is a node of the custom content type "cex_project". 2) A cex_project is really a 'container node' consisting of a project description and then a listing of other nodes associated with whatever that project is, where the other nodes are of various different content types, some normal Drupal content types and some are custom content types specific to this client's business. Currently, I have the cex_project View sorting by "Node: updated data", but that only looks at the cex_project node, I'd like to have the sorting based upon the "updated data" to include any of the sub-nodes pointed to by the cex_project as well as the original cex_project node. This strikes me as potentially a common situation, but google is yielding not much more than tutorials on the basics... I guess I could add some logic somewhere that 'touches' any cex_project nodes that are pointed to by other nodes when they are edited, but that seems like the hard way... Sincerely, -Blake bsenftner@earthlink.net www.BlakeSenftner.com
On 12/13/2010 11:47 AM, Blake Senftner wrote:
Fellow Developers,
Any suggestions for how to sort a View when:
1) The View is a listing of "Active Projects", where each item in the View is a node of the custom content type "cex_project".
2) A cex_project is really a 'container node' consisting of a project description and then a listing of other nodes associated with whatever that project is, where the other nodes are of various different content types, some normal Drupal content types and some are custom content types specific to this client's business.
Your best bet is to react to updates on the child nodes and set the parent node's update time to match, or failing that, another field on the parent node which represents the most recent time anything was updated. Any other option is going to result in a potentially long-running query using complex rules.
participants (2)
-
Blake Senftner -
Earl Miles