douxiezha9319 2013-05-08 13:32
浏览 15
已采纳

从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?

  • 写回答

2条回答 默认 最新

  • douchendan0040 2013-05-14 14:37
    关注

    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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
  • ¥100 连续两帧图像高速减法
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作