Determine Portlet IDs in Liferay

Sometimes you might need to dynamically determine the IDs of all portlets placed in certain pages. Here is how you can do it: That’s it!