Drupal: .htaccess Access Deny
August 21, 2012 – 7:59 am | No Comment

In this article I will tell how to forbid access to certain resources for some clients. The instructions will include descriptions of different directives.

First let’s speak about Order directive of .htaccess file of Apache server.
Description: …

Read the full story »
CSS Templates

Contain reviews and news about CSS Templates.


Contain freebies such as icons, graphics, headers and images for your websites.

Fun Stuff

Contains other fun stuff for entertainment or interesting site showcase.


Contain technical elaborations on some specific workarounds or common tweak.

Joomla Templates

Contains reviews and news about Joomla templates.

Home » How-To

Drupal: Description of $node object

Submitted by on March 15, 2011 – 10:18 amNo Comment

In this article, we will study $node object that is available in node.tpl.php template. When we are done, we can use the object to adjust the node design.


You can view the node content with the standard PHP functions (insert the following code to node.tpl.php file first: print_r($node)

$node has the following variables

  • body – the node content
  • changed – date of the last changes in Unix-format
  • comment – if comments are enabled. Three values are allowed.
  • comment_count – the number of comments .
  • created – the date of creating in Unix-format (string(10) “1198024338″)
  • data – was set to NULL
  • files – perhaps, attached files.
  • format – number of input format starting from 1.
  • last_comment_name – name of the last commentator
  • last_comment_timestamp – date when the last comment is left in Unix format.
  • log – don’t know what is this, It was empty.
  • moderate – moderation flag. Equal null if the node doesn’t require moderation.
  • name – name of the author
  • nid – number of the node
  • path – relative synonym of the path (“content/turpis-premo-inhibeo-abico-luctus”)
  • picture – user picture.
  • promote – “In the home page”=1, otherwise =0
  • revision_timestamp – date of the version in Unix-format
  • status – if it is published = 1, otherwise =0
  • sticky – over the rest of the nodes =1, otherwise =0
  • taxonomy – node parents. I.e. taxonomy parents.
  • teaser – the teaser
  • title – node title
  • type – type of the node
  • uid – author’s ID
  • vid – version id. Doesn’t always match with nid.

Additional modules

The additional modules can add their variables to the object. These are such modules:

  • CCK – every added field will be a set of parameters.
  • Nodeteaser – adds $node->nodeteaser, which is TRUE or FALSE, and the teaser is located in $node->teaser.

Good luck!

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.