Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Portlet header tool-tip
Hello.
We use Liferay for our company intranet, and have quite a few portlets that need some explanation. For example, our Message boards have text about how the threads are organized and managed. Currently, we are using a web content article placed above the portlet, but we would like to move this text into pop-up tool-tip, to free up space on the page. What do people think about adding a tool-tip option into the look-and-feel of each portlet?
We are currently migrating from Liferay 6.2 to 7.2.
-- Rob Hazel.
We use Liferay for our company intranet, and have quite a few portlets that need some explanation. For example, our Message boards have text about how the threads are organized and managed. Currently, we are using a web content article placed above the portlet, but we would like to move this text into pop-up tool-tip, to free up space on the page. What do people think about adding a tool-tip option into the look-and-feel of each portlet?
We are currently migrating from Liferay 6.2 to 7.2.
-- Rob Hazel.
Hey Rob,Portlets can already have a description in their definition (portlet.xml or alternatives), which can also be translated if needed.My suggestion to achieve what you want is to leverage that and then in your own theme modify portlet.ftl to customize the "box" around the portlet so that it's possible to open the tool-tip from it.What do you think?
Hello Jorge,
Thanks for your feedback. I like your idea, and it would work for our design. However, from my understanding, it would be hard to make this feature explicit to the (admin) user. For example, I could code the portlet.ftl to analyze the description, and transform anything contained in parenthesis into a tool-tip; but the user would not know the option was there simply from looking at the UI. Our product owner would like to have a dedicated field for the tool-tip, which would be self-explanatory.
If anyone else would find this useful please let me know, and I will put in a feature request. Otherwise, I will try and implement a solution around Jorge's suggestion.
Thanks,
Rob.
Thanks for your feedback. I like your idea, and it would work for our design. However, from my understanding, it would be hard to make this feature explicit to the (admin) user. For example, I could code the portlet.ftl to analyze the description, and transform anything contained in parenthesis into a tool-tip; but the user would not know the option was there simply from looking at the UI. Our product owner would like to have a dedicated field for the tool-tip, which would be self-explanatory.
If anyone else would find this useful please let me know, and I will put in a feature request. Otherwise, I will try and implement a solution around Jorge's suggestion.
Thanks,
Rob.
Rob Hazel:
You could also try to make your way with a Portlet Toolbar Contributor. Not quite a tooltip, but a readily available extension point that can target any portlet you'd like.
If anyone else would find this useful please let me know, and I will put in a feature request.
Thanks, Olaf. I will look into it as an option.
--Rob.
--Rob.
Hey Rob,I'm not sure I follow why "it would be hard to make this feature explicit to the (admin) user". It all depends on your design. You can even choose to make it show the description as regular text the very first time and if closed then after that just show an "help" icon that when click shows the description again in a tooltip.Whatever design you can think of, it should be implementable in portlet.vm
Hello Jorge,
My understanding of your suggestion is that we could leveraging the existing description field, and use the theme's portlet template to create the help icon. My concern is that even if I used the existing description field in the portlet 'Look and Feel', I still need to update the UI, to inform the user how to take advantage of this feature - to make it intention revealing. For example, if the idea is that anything entered into parenthesis in the description field is turned into a tool-tip, I need to put this in some explanatory text (either a tool-tip or sub text).
Thanks for thinking this through with me.
Rob.
My understanding of your suggestion is that we could leveraging the existing description field, and use the theme's portlet template to create the help icon. My concern is that even if I used the existing description field in the portlet 'Look and Feel', I still need to update the UI, to inform the user how to take advantage of this feature - to make it intention revealing. For example, if the idea is that anything entered into parenthesis in the description field is turned into a tool-tip, I need to put this in some explanatory text (either a tool-tip or sub text).
Thanks for thinking this through with me.
Rob.
Hey Rob,
My proposal was to leverage the description field that portlets already have as part of their definition in portlet.xml (see portlet-info/description) which can also be introduced (and translated) in the Language.properties files (javax.portlet.description.{{portlet-name}}). This requires updating the file and re-deploy the portlet. The field is already meant for a description so you wouldn't need to follow any syntax.This value can then be read from the code in portlet.ftl (${portletDisplay.description}) and presented in any way desired.
I hope that helps.
My proposal was to leverage the description field that portlets already have as part of their definition in portlet.xml (see portlet-info/description) which can also be introduced (and translated) in the Language.properties files (javax.portlet.description.{{portlet-name}}). This requires updating the file and re-deploy the portlet. The field is already meant for a description so you wouldn't need to follow any syntax.This value can then be read from the code in portlet.ftl (${portletDisplay.description}) and presented in any way desired.
I hope that helps.
Thanks, Jorge.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™