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
Programmatically remove a portlet from a page
I'm trying to write code that will remove a portlet from a page. I've found this article: Remove portlets programmatically with the removePortletId method, but the solution presented there doesn't quite do the entire job. It does seem to clean out the portlet configuration, since when I reload the page I get the "portlet is not configured" message. But the portlet is still on the page, and I would like to remove it entirely. Is there a way to do this?
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™