I've setup a block view that accepts a node id as an argument, and it works when i add an argument in the preview textfield.

Now when I use Views Reference in Page content type and allow for arguments to my block view nothing happens. I'm just typing in the node id into the textfield "106". Is there something else i should be specifying?

Comments

realOFF’s picture

I believe you are using the wrong module.
I think View Reference will just link to a View, but I could be wrong here since I don't have any experience with it.

Now, let's say you want a View to appear in a Page node, and you want that view to receive the current node id as an argument. You can achieve this in -at least- two ways:

1. CCK & Viewfield.
This approach will allow you to add a CCK Field to every Page node where you can choose a View to be shown. In the options you can set it to pass the node id.

2. views_embed_view
This Views function will allow you to embed a View anywhere passing the arguments you want. You will need PHP coding for this. The code will be something like this:
<?php print views_embed_view('thumbnails', 'block_13', $node->nid, $node->type); ?>
You may edit your template (or use Content Template module) or use the PHP Filter in any text area and put the code wherever it fits. Please refer to the available documentation for more information.

So far, I haven't been able to pass an argument to a View shown in any Block region.
I think Blocks do not load Node variables. That could be why.

Hope this helps.
Have fun. =)

WorldFallz’s picture

Blocks don't intrinsically understand arguments-- you need to use the 'provide default' in the argument settings. To use the nid of the node being views, you can use the 'node id from url' option.