(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
Courtesy : thanhsiang.org
- guru's blog
- Login to post comments
![Drupal-6-Book-[Building Powerful and Robust Websites with Drupal 6].jpg](http://www.drupalranch.com/images/Drupal-6-Book-[Building%20Powerful%20and%20Robust%20Websites%20with%20Drupal%206].jpg)