【问题标题】:Where can I find or add where different favicon implementations should go in Liferay?我在哪里可以找到或添加 Liferay 中不同的 favicon 实现应该放在哪里?
【发布时间】:2017-07-19 14:37:42
【问题描述】:

所以我可以通过这个目录为每个主题配置一个 favicon:my-theme/src/main/webapp/images/favicon.ico,但 MDN 建议将 favicon 配置为针对不同平台的不同大小,如下所示:

<!-- third-generation iPad with high-resolution Retina display: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://developer.cdn.mozilla.net/static/img/favicon144.a6e4162070f4.png">
<!-- iPhone with high-resolution Retina display: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="https://developer.cdn.mozilla.net/static/img/favicon114.0e9fabd44f85.png">
<!-- first- and second-generation iPad: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="https://developer.cdn.mozilla.net/static/img/favicon72.8ff9d87c82a0.png">
<!-- non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="https://developer.cdn.mozilla.net/static/img/favicon57.a2490b9a2d76.png">
<!-- basic favicon -->
<link rel="shortcut icon" href="https://developer.cdn.mozilla.net/static/img/favicon32.e02854fdcf73.png">

liferay wiki article on favicons 建议编辑 Top_Head.jsp,但该文件在我的系统上的任何位置都不存在。

我找到了portal_normal.vm 文件,似乎 是放置网站图标配置的正确位置,如上例所示,但仍不确定放置它们的确切位置。有什么想法吗?

【问题讨论】:

  • 您使用的是哪个版本的liferay?
  • liferay-portal-6.2-ee-sp17
  • 您必须创建一个自定义 jsp 挂钩来覆盖 top_head JSP 以添加这些标签。如果您仍在寻找解决方案,请参阅此post

标签: liferay cross-platform liferay-6 favicon liferay-theme


【解决方案1】:

我找到了可以放置网站图标配置的文件:liferay-portal-6.2-ee-sp17/tomcat-7.0.62/webapps/ROOT/html/common/themes/top_head.jsp

【讨论】:

  • 此行下方:&lt;link href="&lt;%= themeDisplay.getPathThemeImages() %&gt;/&lt;%= PropsValues.THEME_SHORTCUT_ICON %&gt;" rel="Shortcut Icon" /&gt;。其中themeDisplay.getPathThemeImages() 是您主题的/images 文件夹,PropsValues.THEME_SHORTCUT_ICON 根据portal.properties 属性theme.shortcut.icon 解析为favicon.ico
猜你喜欢
  • 1970-01-01
  • 2015-03-31
  • 1970-01-01
  • 2019-05-01
  • 2017-11-06
  • 2011-03-11
  • 2019-07-31
  • 2020-12-29
  • 1970-01-01
相关资源
最近更新 更多