首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >更改Drupal中的图标

更改Drupal中的图标
EN

Stack Overflow用户
提问于 2011-04-18 16:16:04
回答 4查看 12.6K关注 0票数 2

我已经上传了一个新的图标到Drupal站点,清除了缓存,但它仍然显示为drip图标,它只在我登录和后端时显示自定义图标。

我在firefox 4和IE 8上试过

谢谢你的帮忙!

Update - HTML标题代码添加到下面。

代码语言:javascript
复制
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home | CIOB</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="shortcut icon" href="/misc/favicon.ico" type="image/x-icon" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/admin_menu/admin_menu.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/ciob.org.uk/files/ctools/css/8df0ab71786aec38c5eef01816622257.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/node/node.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/defaults.css?d" />

<link type="text/css" rel="stylesheet" media="all" href="/modules/system/system.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/system-menus.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/user/user.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/cck/theme/content-module.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/ctools/css/ctools.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/date/date.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/filefield/filefield.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/lightbox2/css/lightbox.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/panels/css/panels.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/admin/toolbar/admin_toolbar.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/calendar/calendar.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/misc/farbtastic/farbtastic.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/views/css/views.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/panels/plugins/layouts/flexible/flexible.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/themes/ciob/styles/framework/reset.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/themes/ciob/styles/framework/text.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/themes/ciob/styles/framework/960.css?d" />

<link type="text/css" rel="stylesheet" media="all" href="/sites/all/themes/ciob/styles/framework/debug.css?d" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/themes/ciob/styles/styles.css?d" />
<script type="text/javascript" src="/misc/jquery.js?d"></script>
<script type="text/javascript" src="/misc/drupal.js?d"></script>
<script type="text/javascript" defer="defer" src="/sites/all/modules/admin_menu/admin_menu.js?d"></script>
<script type="text/javascript" src="/sites/all/modules/lightbox2/js/lightbox_video.js?d"></script>
<script type="text/javascript" src="/sites/all/modules/lightbox2/js/lightbox.js?d"> </script>
<script type="text/javascript" src="/sites/all/modules/panels/js/panels.js?d"></script>
<script type="text/javascript" src="/sites/all/modules/poormanscron/poormanscron.js?d"</script>

<script type="text/javascript" src="/sites/all/modules/admin/toolbar/admin_toolbar.js?d"></script>
<script type="text/javascript" src="/sites/all/themes/ciob/bookmark.js?d"></script>
<script type="text/javascript" src="/sites/all/themes/ciob/ciob.js?d"></script>
<script type="text/javascript" src="/sites/all/themes/ciob/ui.core.js?d"></script>
<script type="text/javascript" src="/sites/all/themes/ciob/ui.tabs.js?d"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, { "basePath": "/", "admin_menu": { "margin_top": 1, "position_fixed": 1 }, "CTools": { "pageId": "page-7f4aa01928040cccbbe2bef65e92817b" }, "googleanalytics": { "trackOutgoing": 1, "trackMailto": 1, "trackDownload": 1, "trackDownloadExtensions": "7z|aac|avi|csv|doc|exe|flv|gif|gz|jpe?g|js|mp(3|4|e?g)|mov|pdf|phps|png|ppt|rar|sit|tar|torrent|txt|wma|wmv|xls|xml|zip" }, "lightbox2": { "rtl": 0, "file_path": "/(\\w\\w/)sites/ciob.org.uk/files", "default_image": "/sites/all/modules/lightbox2/images/brokenimage.jpg", "border_size": "10", "font_color": "000", "box_color": "fff", "top_position": "", "overlay_opacity": "0.8", "overlay_color": "000", "disable_close_click": 1, "resize_sequence": "0", "resize_speed": 400, "fade_in_speed": 400, "slide_down_speed": 600, "use_alt_layout": 0, "disable_resize": 0, "disable_zoom": 0, "force_show_nav": 0, "loop_items": 0, "node_link_text": "View Image Details", "node_link_target": 0, "image_count": "Image !current of !total", "video_count": "Video !current of !total", "page_count": "Page !current of !total", "lite_press_x_close": "press \x3ca href=\"#\" onclick=\"hideLightbox(); return FALSE;\"\x3e\x3ckbd\x3ex\x3c/kbd\x3e\x3c/a\x3e to close", "download_link_text": "Download Original", "enable_login": false, "enable_contact": false, "keys_close": "c x 27", "keys_previous": "p 37", "keys_next": "n 39", "keys_zoom": "z", "keys_play_pause": "32", "display_image_size": "", "image_node_sizes": "()", "trigger_lightbox_classes": "", "trigger_lightbox_group_classes": "", "trigger_slideshow_classes": "", "trigger_lightframe_classes": "", "trigger_lightframe_group_classes": "", "custom_class_handler": 0, "custom_trigger_classes": "", "disable_for_gallery_lists": true, "disable_for_acidfree_gallery_lists": true, "enable_acidfree_videos": true, "slideshow_interval": 5000, "slideshow_automatic_start": true, "slideshow_automatic_exit": true, "show_play_pause": true, "pause_on_next_click": false, "pause_on_previous_click": true, "loop_slides": false, "iframe_width": 600, "iframe_height": 400, "iframe_border": 1, "enable_video": 1, "flvPlayer": "/flvplayer.swf", "flvFlashvars": "" }, "cron": { "basePath": "/poormanscron", "runNext": 1303116980 } });
//--><!]]>
</script>

<!--[if lte IE 6]>
<link rel="stylesheet" href="/sites/all/themes/ciob/styles/ie6.css" type="text/css" />
<script type="text/javascript"> 
  $(document).ready(function(){ 
      $(document).pngFix(); 
  }); 
</script>


<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="/sites/all/themes/ciob/styles/ie7.css" type="text/css" />
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" href="/sites/all/themes/ciob/styles/ie8.css" type="text/css" />
<![endif]-->
</head>
EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2011-04-18 16:45:03

如您所见,HTML指向默认的收藏夹图标:<link rel="shortcut icon" href="/misc/favicon.ico" type="image/x-icon" />

Drupal不会覆盖它,但会将您的自定义收藏图标上传到"files/....“。然后更改HTML以使用它。

您的HTML未更改。这可能意味着以下两种情况之一:

  1. 未正确上载收藏夹图标,Drupal出现错误,未对其进行更改。
  2. 收藏夹图标已正确上载,但您的主题具有硬编码的默认位置。

我怀疑是后者。主题的page.tpl.php文件应该包含<?php print $header ?>,而不是硬编码的<link rel="shortcut icon" ...

票数 3
EN

Stack Overflow用户

发布于 2012-11-21 02:53:47

主要针对那些有相同问题的人,即在管理页面中显示收藏夹图标,但不在首页显示:

  • 确保您不仅要更改全局主题设置中的收藏图标,还要更改活动主题设置(外观>设置>单击您的主题名称)

的设置中的收藏图标

票数 1
EN

Stack Overflow用户

发布于 2015-07-13 14:46:25

在我的例子中,它使用的是favicon图标,setted bij,即opengraph元属性,而不是link rel快捷方式图标。例如:不过,这取决于你使用的浏览器。因此,请确保在元模块和主题设置中都设置正确。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5700174

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档