[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/modules/node/ -> node.tpl.php (source)

   1  <?php
   2  
   3  /**
   4   * @file node.tpl.php
   5   *
   6   * Theme implementation to display a node.
   7   *
   8   * Available variables:
   9   * - $title: the (sanitized) title of the node.
  10   * - $content: Node body or teaser depending on $teaser flag.
  11   * - $picture: The authors picture of the node output from
  12   *   theme_user_picture().
  13   * - $date: Formatted creation date (use $created to reformat with
  14   *   format_date()).
  15   * - $links: Themed links like "Read more", "Add new comment", etc. output
  16   *   from theme_links().
  17   * - $name: Themed username of node author output from theme_username().
  18   * - $node_url: Direct url of the current node.
  19   * - $terms: the themed list of taxonomy term links output from theme_links().
  20   * - $submitted: themed submission information output from
  21   *   theme_node_submitted().
  22   *
  23   * Other variables:
  24   * - $node: Full node object. Contains data that may not be safe.
  25   * - $type: Node type, i.e. story, page, blog, etc.
  26   * - $comment_count: Number of comments attached to the node.
  27   * - $uid: User ID of the node author.
  28   * - $created: Time the node was published formatted in Unix timestamp.
  29   * - $zebra: Outputs either "even" or "odd". Useful for zebra striping in
  30   *   teaser listings.
  31   * - $id: Position of the node. Increments each time it's output.
  32   *
  33   * Node status variables:
  34   * - $teaser: Flag for the teaser state.
  35   * - $page: Flag for the full page state.
  36   * - $promote: Flag for front page promotion state.
  37   * - $sticky: Flags for sticky post setting.
  38   * - $status: Flag for published status.
  39   * - $comment: State of comment settings for the node.
  40   * - $readmore: Flags true if the teaser content of the node cannot hold the
  41   *   main body content.
  42   * - $is_front: Flags true when presented in the front page.
  43   * - $logged_in: Flags true when the current user is a logged-in member.
  44   * - $is_admin: Flags true when the current user is an administrator.
  45   *
  46   * @see template_preprocess()
  47   * @see template_preprocess_node()
  48   */
  49  ?>
  50  <div id="node-<?php print $node->nid; ?>" class="node<?php if ($sticky) { print ' sticky'; } ?><?php if (!$status) { print ' node-unpublished'; } ?> clear-block">
  51  
  52  <?php print $picture ?>
  53  
  54  <?php if (!$page): ?>
  55    <h2><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
  56  <?php endif; ?>
  57  
  58    <div class="meta">
  59    <?php if ($submitted): ?>
  60      <span class="submitted"><?php print $submitted ?></span>
  61    <?php endif; ?>
  62  
  63    <?php if ($terms): ?>
  64      <div class="terms terms-inline"><?php print $terms ?></div>
  65    <?php endif;?>
  66    </div>
  67  
  68    <div class="content">
  69      <?php print $content ?>
  70    </div>
  71  
  72    <?php print $links; ?>
  73  </div>


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7