Return to Snippet

Revision: 46948
at May 27, 2011 23:14 by janlodey


Initial Code
if (arg(0) == 'node' && is_numeric(arg(1))) {
  $node = node_load(arg(1));
  return $node->field_proj_parent_ref[0][nid];
} else {
  return FALSE;
}

Initial URL


Initial Description
Use this to pull a list of items based on the nid of the 'parent' node.... so you can show fields added to that node, on the child. Handy.

Make nid argument..... use custom php arg code below to feed the argument the nid of the parent.

Remember to change the $ to the field name you are targeting..... IMPORTANT

Initial Title
Views node relationship argument

Initial Tags
drupal

Initial Language
PHP