It would be very handy to be able to pass the current node's ID to views when using a filter view. I've added a patch that does that. The patch adds a "Include current node ID as view argument?" field to the block config page.

Finally, the patch allows you to include other node ids in the view results that are used to populate the block. This works as follows:

- For each returned row in the view, look to see if there are any values with a key that ends in '_nid'. If so, use that value
- If there is no field found that matches the above condition, use the main row nid

A use case that this patches meets is wanting to include the results that brings in (and filters down on) nodes related to the current node (such as through a CCK node relation or the taxonomy)

This patch is more useful when combined with the patch mentioned in this issue: - link to come -

Hope this is helpful. Please let me know if I can explain better.

CommentFileSizeAuthor
featured_content_view_arguments.diff3.41 KBsnyderp

Comments

kristen pol’s picture

Assigned: Unassigned » kristen pol
Status: Active » Needs review

Thanks! I will try to look at it this weekend.

Kristen

snyderp’s picture

Sounds great! That - link to come - section should point to "http://drupal.org/node/1101060" too. Sorry about that!

kristen pol’s picture

I confirmed this is working and will check it in shortly... having trouble with git push at the moment.

Kristen

kristen pol’s picture

All checked in... it will be there (in dev version) once the next drupal cron runs.

Thanks!
Kristen

kristen pol’s picture

Status: Needs review » Closed (fixed)
kristen pol’s picture

Assigned: kristen pol » Unassigned
Issue summary: View changes

cleaning up my issues list