I have something I'd like to do with Views arguments and I'm unsure how to do it.

Here is a thumbnail sketch of what I'd like to do: http://andrewjarvis.com/sites/default/files/legacy_child_nodes_view.jpg

I've read through the documentation and from what I understand I'll have to do most-if not all-of it in the PHP default argument itself. The documentation on Views arguments doesn't seem to get into the nitty-gritty of how to actually write these arguments, if there's a documentation page I'm missing that's fine, but I think most of it is written assuming a rather high "current knowledge".

CommentFileSizeAuthor
legacy_child_nodes_view.jpg278.68 KBAndrewJarvis

Comments

dawehner’s picture

You just have to get a default argument.

Some kind of code like this works.

if ($node = menu_get_object()) {
  $values = field_get_items('node', $node, 'field_name');
  return $values[0]['nid'];
}

This will probably not work 1by1 but i guess you get the idea.

By the way: you should update to the dev version of views and ctools. It has a new ui.

merlinofchaos’s picture

Status: Active » Fixed

Looks like dereine answered this, I think.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.