从drupal 7中的后端界面将网站徽标链接到外部URL

Need to link website logo to external url from backend interface in drupal 7.

Now I hard coded it to my page.tpl.php file.

Is there any option to add it from backend?

There are no default option for linking website logo to the external URL.

We need to create a field in the back end for theme settings.

  1. Create a page theme-settings.php just inside theme folder with the following code

    function theme_form_system_theme_settings_alter(&$form, $form_state) {

    $form['theme_settings'] = array(

    '#type' => 'fieldset',
    
    '#title' => t('Theme settings')
    

    );

$form['theme_settings']['theme_logourl'] = array(

    '#type'          => 'textfield',

    '#title'         => t('Logo url'),

    '#default_value' => theme_get_setting('theme_logourl'),

    '#description'   => t("Logo url for external linking"),

  );
  return $form;

}
  1. Go and check to the theme settings page - appearance/settings/theme

    There will be a new text filed to enter the external url

For Drupal 7 you can refer to this discussion: In the template.php file, change <front> to whatever link you like. ( is a Drupal shortcut for the frontpage url)