简体   繁体   English

如何在Liferay门户中更改图标

[英]How to change the icon in liferay portal

I want to change the icon in liferay portlet. 我想更改Liferay Portlet中的图标。 How can I change the icon and what is the use of icon.png in liferay portlet? 我该如何更改图标以及liferay Portlet中icon.png的用途是什么?

/PORTLET-NAME/
    build.xml
    /docroot/
        /css/
        /js/
        /WEB-INF/
            /src/ (not created by default)
            liferay-display.xml
            liferay-plugin-package.properties
            liferay-portlet.xml
            portlet.xml
            web.xml
        icon.png
        view.jsp
  • Icon.png is default image icon displayed in your portlet, At top left corner just before Portlet title. Icon.png是Portlet中显示的默认图像图标,位于Portlet标题的左上角。 If you want to use your image replace default icon.png with yours keeping the name same. 如果要使用图像,请使用默认名称替换默认的icon.png。

OR As Olaf Kock suggested 或如Olaf Kock所建议

  • Update your image path / name in liferay-portlet.xml as the location to change/configure icon.png 更新liferay-portlet.xml中的图像路径/名称,作为更改/配置icon.png的位置

<icon>/newicon.png</icon>

Better option is to create a new theme with pluginsSDK, (copy the classic theme for starting) and then replace the portal favicon in the new theme folder with new one. 更好的选择是使用pluginsSDK创建一个新主题(复制经典主题以进行启动),然后用新主题替换新主题文件夹中的门户网站图标。

Alternatively, add the following code in portal-ext.properties file: 或者,在portal-ext.properties文件中添加以下代码:

theme.shortcut.icon=your_new_icon.ico

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM