It'd be great if someone could tell me how to do this (aside from simply adding the target="_blank" option to the code). Client wants no part of using HTML so my goal is to have it added to the inserted file by default. If someone could point me in the right direction that'd be perfect.

Comments

zuernbernhard’s picture

The best way would be if the module does not render a hardcoded link in the template but makes use of l() function instead. But seems to be not implemented right now.

zuernbernhard’s picture

Meanwhile there is another way i you don't want to hack the module. I did the following to override it for "icon with link":

1.) Create a custom Module

2.) Implement hook_theme_registry_alter():

/**
 * Implements hook_theme_registry_alter().
 */
function text_feature_theme_registry_alter(&$theme_registry) {
  $path = drupal_get_path(
    'module',
    basename(__FILE__, '.module')
    ).'/insert-templates';
  if (isset($theme_registry['insert_icon_link'])) {
    $theme_registry['insert_icon_link']['template'] = $path.'/insert-icon-link';
    $theme_registry['insert_icon_link']['theme path'] = $path;
  }
}

3.) Copy the corresponding tpl.php file from the insert module to your module in a subdirectory called "insert-templates" and override it according to your needs.

snater’s picture

Status: Active » Closed (works as designed)

The cleanest solution would be to create a subtheme of your admin theme, copy the Insert module templates you want to alter to the subtheme's templates folder and alter the HTML there. Nothing to be changed in the module's source code and no need for a separate module.