1

I have a field(field_video) for Embedded Videos. I have a view that shows a list of all Videos and I want to be able to sort that view by when the video was last accessed(Recently Viewed), when the video was added(New Videos), and total number of views(Popular). Is it possible to sort a view based on attributes of the field? I have a quicktab that would then show a block of each view by each specific sort criteria.

0

Such attributes are not available on fields, but they are available for nodes, and it sounds like that's all you need.

Views already provides a Sort Criteria for "Content: Updated date."

To sort by node statistics, make sure that the Statistics module is enabled (it's part of Core). That will provide additional Sort Criteria in Views. Add a Sort Criteria and filter by "Content statistics" to see three new options.

If you really need to use similar attributes on fields, you can use Rules to update extra fields based on whichever events you desire, and filter Views with those values.

  • That would only show nodes that have been recently updated. There are many attributes that could be updated in a given node including adding a video. So if a user uploaded a picture to a node that already has a video the sort criteria would show an updated video in Video View but it would not be accurate. I basically need statistics for a field attribute. – Barry Chester Aug 3 '12 at 0:09
  • Those attributes do not exist to be updated, but you can create them. I would advise building a module to attach the data, but you can create additional fields to store the attributes and update their values with Rules, too. – theneonlobster Aug 3 '12 at 20:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.