(How to) How to display CCK fields in a table in Drupal 5/Drupal 6?

How to display CCK fields in a table in Drupal 5/Drupal 6?

In Drupal 5/Drupal 6 with CCK module installed and activated, you just define your content type, then create a node-content_type.tpl.php file to render the nodes for that content (replace "content_type" in the filename by the "machine readable" content type name you gave while creating the type).

To access your customized fields within the template using

<?php
print $fieldname[0][view];
?>


where fieldname is the "machine readable" fielde name you provided while creating the field.

To display the title of the page, use

<?php
print $title;
?>


To display body of the page, use

[Read more..]

Courtesy : thanhsiang.org