I'm trying to get some php code to work in a Panel Pane.

In the code below, all my 'if' statements evaluate to 'false' because I'm missing something fundamental to how I access fields from a node. The panel is a Node View page and all the fields should refer to the node being viewed.

I'm hoping some kind Drupaler will tell me what I need to do to access these fields.


   $delta = 1;
    $workshopMenu = '
    '; // Description Link $workshopMenu = $workshopMenu.'
  • Description
  • '; ++$delta; // Video if($vars['node']->field_workshop_video_reference['und'][0][nid]) { $workshopMenu = $workshopMenu.'
  • Video
  • '; ++$delta; } // More Info Link if($vars['node']->field_workshop_more_information['und'][0]['value'] || $vars['node']->field_workshop_things_to_bring['und'][0]['value']) { $workshopMenu = $workshopMenu.'
  • More Information
  • '; ++$delta; } // Continuing Education Link print $vars['field_workshop_cont_ed']['und']; if($vars['field_workshop_cont_ed']['und']) { $workshopMenu = $workshopMenu.'
  • Continuing Education
  • '; ++$delta; } // Schedule Link if($vars['node']->field_workshop_schedule['und'][0]['value']) { $workshopMenu = $workshopMenu.'
  • Schedule
  • '; ++$delta; } // Teacher Links //if(count($vars['node']->field_workshop_people['und']) >= 9) { if($vars['node']->field_workshop_people['und']) { $workshopMenu = $workshopMenu.'
  • Teachers
  • '; ++$delta; } // ACC Link if($vars['node']->field_workshop_acc_link['und'][0]['value']) { $workshopMenu = $workshopMenu.'
  • field_workshop_acc_link['und'][0]['value'].'" title="Accommodations & Commuter Fee">Accommodations & Commuter Fee
  • '; } else { $workshopMenu = $workshopMenu.'
  • Accommodations & Commuter Fee
  • '; } // Location Link if($vars['node']->field_workshop_acc_link['und'][0]['value']) { $location = node_load($vars['node']->field_workshop_campus['und'][0]['nid']); $workshopMenu = $workshopMenu.'
  • '.l($location->title, 'node/'.$location->nid).'
  • '; } else { $workshopMenu = $workshopMenu.'
  • Rhinebeck Campus Info
  • '; } // Workshop Links if($vars['node']->field_workshop_links['und'][0]['url']): foreach($vars['node']->field_workshop_links['und'] as $link) { $workshopMenu = $workshopMenu.'
  • '.l($link['title'], $link['url']).'
  • '; } endif; // Cancelation Link if($vars['node']->field_workshop_cancelation_link['und'][0]['value']) { $workshopMenu = $workshopMenu.'
  • field_workshop_cancelation_link['und'][0]['value'].'" title="Cancellation Policy">Cancellation Policy
  • '; } else { $workshopMenu = $workshopMenu.'
  • Cancellation Policy
  • '; } $workshopMenu = '
    '.$workshopMenu.'
    '; print $workshopMenu;