01-30-06 02:46 AM
Karin,
There is a way to get the layout mode of a portal page. I once did some test
ing with the code below which gives you the ContentNode of the portal:
InitialContext ctx = new InitialContext();
ContentModelHome cmHome =
(ContentModelHome)ctx.lookup("portal:service/model/ContentModel");
ContentModelProvider cmProvider = cmHome.getContentModelProvicer();
ContentModel cModel = cmProvider. getContentModel((ServletRequest)request,
(S
erlvetResponse)response);
ContentNode root = (ContentNode)cModel.getRoot();
From the root you can iterate through the children and check if the node is:
- a ContentNode
- a Container
- a Control
You should be able to get the layout of the page from either the Container o
r the Control (not certain which one it was...)
Have fun!
Dennis
[ Post a follow-up to this message ]
|