You are here

node-content_example.tpl.php in Content Construction Kit (CCK) 5

File

theme/node-content_example.tpl.php
View source
<div id="node-<?php

print $node->nid;
?>" class="node<?php

if ($sticky) {
  print ' sticky';
}
if (!$status) {
  print ' node-unpublished';
}
?>">

<?php

print $picture;
?>

<?php

if ($page == 0) {
  ?>
  <h2><a href="<?php

  print $node_url;
  ?>" title="<?php

  print $title;
  ?>"><?php

  print $title;
  ?></a></h2>
<?php

}
?>

  <?php

if ($submitted) {
  ?>
    <span class="submitted"><?php

  print t('!date — !username', array(
    '!username' => theme('username', $node),
    '!date' => format_date($node->created),
  ));
  ?></span>
  <?php

}
?>

  <div class="content">
    Here's one field:
      <?php

print $field_my_field[0]['view'];
?>

    And another:
    <ul>
      <?php

foreach ($field_my_other_field as $item) {
  print '<li>' . $item['view'] . '</li>';
}
?>
    </ul>
  </div>

  <div class="clear-block clear">
    <div class="meta">
    <?php

if ($taxonomy) {
  ?>
      <div class="terms"><?php

  print $terms;
  ?></div>
    <?php

}
?>
    </div>

    <?php

if ($links) {
  ?>
      <div class="links"><?php

  print $links;
  ?></div>
    <?php

}
?>
  </div>

</div>