简体   繁体   中英

How to change the icon in liferay portal

I want to change the icon in liferay portlet. How can I change the icon and what is the use of icon.png in liferay portlet?

/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. If you want to use your image replace default icon.png with yours keeping the name same.

OR As Olaf Kock suggested

  • Update your image path / name in liferay-portlet.xml as the location to change/configure 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.

Alternatively, add the following code in portal-ext.properties file:

theme.shortcut.icon=your_new_icon.ico

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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