Changing the link title in a view for generic file I have a bunch of files that are displayed in a view; i'm using 'generic files' setting to display them; the problem is that some files have really ugly names like '1002-32-eda.pdf' i'd like to change the name to 'download' but keep the 'mime' detection (small icon on the left side; like pdf, word etc).

Any example on how to change this ?
I'm guessing that you are using a field to save the data about the files.

When the file is displayed in views, it's displayed through a formatter which acts like a theme function. The different ways an image can be shown, is in reality just different formatters that link to different theme functions (or the same, but with different arguments).

You have two options.
* You can override the theme function, which would change how ALL files are shown, when displayed using 'generic files'.
* Yo
u can create your own formatter, and theme function which could be a copy of the one Generic files uses, but with a few alterations.

The hooks you need to use, depend on which version of Drupal you use, but you can search the modules and copy how it's done for Generic files.

For a long explaination you can check out this blog post I wrote a while back.

The short version is:

use Hook_field_formatter_info:

/**
 * Implementation of CCK's hook_field_formatter_info().
 */
function module_formatter_info() {
  return array(
    'default' =&gt; array(
      'label' =&gt; t('My generic files'),
      'field types' =&gt; array('filefield'),
      'multiple values' =&gt; CONTENT_HANDLE_CORE,
      'description' =&gt; t('My description.'),
    ),
  );
}


Next use hook_theme, creating a theme function with a hook like name:

function filefield_theme() {
  return array(
    'module_formatter_default' =&gt; array(
      'arguments' =&gt; array('element' =&gt; NULL),
    ),
  );
}


Lastly create the theme function

/**
 * Theme function for the 'default' filefield formatter.
 */
function theme_module_formatter_default($element) {
  $file = $element['#item'];
  $file['data']['description'] = t('Download');
  $field = content_fields($element['#field_name']);
  $output = theme('filefield_item', $file, $field);
  return $output;
}


The above code should work and do what you want, but haven't actually tested this.