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.
| Comment | File | Size | Author |
|---|---|---|---|
| featured_content_view_arguments.diff | 3.41 KB | snyderp |
Comments
Comment #1
kristen polThanks! I will try to look at it this weekend.
Kristen
Comment #2
snyderp commentedSounds great! That - link to come - section should point to "http://drupal.org/node/1101060" too. Sorry about that!
Comment #3
kristen polI confirmed this is working and will check it in shortly... having trouble with git push at the moment.
Kristen
Comment #4
kristen polAll checked in... it will be there (in dev version) once the next drupal cron runs.
Thanks!
Kristen
Comment #5
kristen polComment #6
kristen polcleaning up my issues list