Ok, more Plumtree. In displaying dynamic content in a Plumtree portlet
we sometimes need to know if the portlet is wide or narrow so we don't
mess up the display of the whole portal. Searching and searching didn't
bring me anything..so here is the code for it.
Code:
using Plumtree.Remote.Portlet;
IPortletContext portletContext = PortletContextFactory.CreatePortletContext(Request, Response);
IPortletRequest portletRequest = portletContext.GetRequest();
IRemoteSession portletRS = portletContext.GetRemotePortalSession();
IPortletManager portletMan = portletRS.GetPortletManager();
IPortlet portlet = portletMan.GetPortletInstance(portletRequest.GetPortletID());
if(portlet.GetAlignment() == Alignment.Narrow)
Response.Write("I'm a narrow portlet!");
else if(portlet.GetAlignment() == Alignment.Wide)
Response.Write("I'm a wide portlet!");