ahoi,

I've used the following code in node.tpl.php, for displaying attachments from a cck filefield:

if ($node->field_file[0]['view']):
print $node->field_file[0]['view']
endif;

but it only shows up the first file and nothing else.

with print $content I get all the content I want, but that's not my intention.

maybe this is an easy task, but in the moment I just don't know how to solve this.
help is very much appreciated.

Comments

yched’s picture

Status: Active » Fixed

You can use the $<FIELD_NAME>_rendered variable - in your case $field_file_rendered.

Install advanced_help module, and see the 'Themeing CCK fields' section in CCK's advanced_help pages for more information.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.