Customizing node layouts

Last modified: August 6, 2008 - 22:35

This section outlines and provides snippets for customizing node layouts.

(If you want to customize the layout of your FULL page, click through to the Customising full page layouts and sections collection of handbook pages and snippets).

Scroll down for some example snippets, that you can copy-and-paste and use in your custom node.tpl.php or node-type.tpl.php layout files.

For more information about node template files, refer to the PHPTemplate documentation.

$teaser

mathmeye - June 1, 2006 - 15:40

in drupal 4.7 here, there's also a $teaser variable indicating whether teaser or full content is displayed.

PAGE: $page == 1, $teaser == 0
TEASER: $page == 0, $teaser == 1
COMMENT_FORM: $page == 0, $teaser == 0

this is helpful if you want for the comment form yet another formatting that for the main page or teaser.

 
 

Drupal is a registered trademark of Dries Buytaert.