Web hosting resellers - CHAPTER 5 ADDING AND CUSTOMIZING THEMES 165
Monday, April 30th, 2007CHAPTER 5 ADDING AND CUSTOMIZING THEMES 165 Node.tpl.php Any time a node (blog, page, event, image, and so on) is rendered, the node.tpl.php template is used. This template handles nodes that are displayed in full and nodes that are displayed as a teaser, such as they would appear in lists of nodes. You can also make a separate template for specific node types, as you ll see after the description of the default node template. Table 5-7 lists the variables available in node.tpl.php. Table 5-7. Variables Available in node.tpl.php Variable Description $content Contains the node s teaser or the node s body, depending on the page context. This variable exists so that the logic of determining whether to show the full body or only the teaser can be left out of the template. The $nodevariable still has the $node->teaser and $node->body available, however. So, if you wish to use different logic for determining which to show, you can still do so. $date The formatted date of this node s creation. $links The HTML containing the node s contextual links, such as links to the comments or attachments. $teaser A Boolean that is true if the node is appearing in a context, like the front page, where only the teaser should be shown. $name The node author s username with a link to her profile page. $node The node object itself. This is very helpful to have available in the template, as modules can add their own fields to this object. Use this object to customize the node s theme based on these added fields. The following $node-> variables are the standard fields of the $node object. $node->body The entire node contents. $node->changed The last modification date, as a UNIX timestamp. $node->created The creation date, as a UNIX timestamp. $node->nid The ID of the node. $node->teaser A shortened version of the node body. $node->title The title of the node. $node->type The content type (story, blog, forum, and so on). $node->uid The ID of the author. $node->username The username of the author. $node_url The node s permalink as a Drupal path. $picture The HTML to output the user s user picture. $submitted Information on who submitted the node and when: Submitted by admin on Tue, 08/02/2005 - 18:29. $terms HTML code containing links to the taxonomy terms for this node. $title The node s title as a string. $sticky A Boolean that is true if the sticky flag is set (meaning it should stay at the top of lists). $taxonomy An array of links to the pages for the taxonomy terms associated with this node. Continued
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision personal web hosting services