Hi in my web page i have attachment files and folders. In that page I have an heading "Attachments" above the attachment links. I want to disable that or rename that "Attachments". What can I do for this?

Thanks in advance,
Revathy.

Comments

Dubber Dan’s picture

I'm just wondering the same myself so anyone got an idea?

ericduran’s picture

In your themes template file add this function. Then clear your theme registry.

function phptemplate_upload_attachments($files) {
  $header = array(t('Attachments'), t('Size'));
  $rows = array();
  foreach ($files as $file) {
    $file = (object)$file;
    if ($file->list && empty($file->remove)) {
      $href = file_create_url($file->filepath);
      $text = $file->description ? $file->description : $file->filename;
      $rows[] = array(l($text, $href), format_size($file->filesize));
    }
  }
  if (count($rows)) {
    return theme('table', $header, $rows, array('id' => 'attachments'));
  }
}

Eric