0

I am creating a View in Drupal 7 for a particular content type. I want to add filter to show nodes which are updated. When I am adding Node Update Date field, it is asking for operator and Value to compare with. But I can not provide Updated date of each node.

Then I also tried hook_views_query_alter to alter the query. When I am adding Query Value to node.created field it take it as a string or you can say Value.

Can someone help me to achieve this?

0

You may be able to use hook_views_query_alter to load only nodes which have node.updated value equal to NULL or ''.

0

There's actually a filter available called Content: Has New Content specifically for this use case.

Content: Has new content
Show only content that is new or updated.
0

You can use the sort option and Sort by Content: Updated date in the views.

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.