1

I have a related content view which displays similar nodes based on shared taxonomy terms. I want it to display related nodes that were published in a date range relative to the current node's creation/published date. E.g: for a node published in March, I want to filter similar nodes that were published between February and April.

Currently I am only able to create a contextual filter "Node: Published at year + month" which displays similar nodes that were published in the same year+month, but I am looking for something similar to the post date filter criteria with operator (image attached), but instead of offset from current time, have an offset from current node's creation date. Is that feasible with views contextual filter? filter criterion as an offset from current date

0

I think in this case you can use panels for that In views create a content pane

enter image description here

Then add contextual filter based on Created Date and in "PANE SETTINGS" click on "Argument input" and use this Settings :

enter image description here

this will export the node's created date from it and pass it through arguments to views.

this will give you an Panel's pane , to add it to your view you can use Page manager module .

  • Thanks for your answer, but I don't see how this will enable me to use a date range filter relative to node's creation time, could you explain further? I use panels to display the view could that be of any help? – Perseids Jun 17 '15 at 21:40

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.