eternalistic
8/30/2013 - 10:58 PM

Drupal - Node variables

Drupal - Node variables

<?php 
  // Set up some variables
  $photo = $node->field_profile_photo['und']['0']['view'];
  $recommend = $node->field_profile_recommend['und']['0']['value'];
  $body = $node->content['und']['body']['#value'];
?>

<?php if ($photo): ?>
<div class="profile-photo profile-field">
  <h3><?php print t('Photo'); ?>:</h3>
  <?php print $photo ?>
</div><!-- /profile-photo -->
<?php endif; ?>

<!-- Render field without spans and divs, just output. -->
<?php print render($content['field_work_vertical'][0]['#markup']); ?>