Drupal 7 Open File attachment Links in New Window

Published by burgerboydaddy on Wed, 11/07/2012 - 13:21


For requests like: Open attachment in new window code bellow should be placed inside template.php file:
Also return statement is wrapped with span/class that allows extra theming options.

function THEMENAME_file_link($variables) {
  $file = $variables['file'];
  $icon_directory = $variables['icon_directory'];

  $url = file_create_url($file->uri);
  $icon = theme('file_icon', array('file' => $file, 'icon_directory' => $icon_directory));

  // Set options as per anchor format described at

Change just one page CSS params

Published by burgerboydaddy on Tue, 09/25/2012 - 15:45


just received request to change just for one page CSS elements (like h1, h2,...). No matter how easy that looks it is not.
Fortunately there is module named CSS Injector (drupal.org/project/css_injector) that fix exactly what I needed.
Just install it, and go to configuration. Add new rule (call it by your page name, for example), add new CSS rules and select to be
visible only for a given node.

Thanks Eaton (@eaton)
all done.