Community Documentation

5. Displaying the Upload Attachments Table

Last updated December 8, 2006. Created by KarenS on June 27, 2006.
Edited by greggles, Zach Harkey. Log in to edit this page.

One problem with replacing the $content variable with individually themed content fields is that the attachments table (upload module) won't be included either.

In these situations you can manually append the attachments table by adding this to the end of your custom node-type.tpl.php:

<?php
 
// Add the attachments list, if needed.
 
if (count($node->files)) {
    print
theme('upload_attachments', $node->files);
  }
?>

About this page

Drupal version
Drupal 4.7.x
Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.
nobody click here