Can I get the page layout model in the portlet? Side-by-side or single page (under eac
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Portal Server > Can I get the page layout model in the portlet? Side-by-side or single page (under eac




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Can I get the page layout model in the portlet? Side-by-side or single page (under eac  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-06 12:53 PM

Hi!
Is there any way to get the layout mode of the page in WPS 5.1?
I don't mean in the theme but in the portlet. I would like to change the lay
out if the portlet is side-by-side with another portlet or if the portlet is
 under another portlet.

As you know there are different strategies when placing portlets in a page. 
One of the is "single page" and another is two columns. Is there a way to - 
from a portlet (IBM) - get the layout mode of the page that is invoking the 
portlet?

Any clues? It feels like kind of off-pist!

Thanks!
Karin





[ Post a follow-up to this message ]



    Re: Can I get the page layout model in the portlet? Side-by-side or single page (under  
Dennis te Lintelo


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Re: Can I get the page layout model in the portlet? Side-by-side or single page (under  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-30-06 02:46 AM

Thanks Dennis!
I also found this content model and I'm trying to use the Layout Model for t
he page. Hopefully it will work. Or I'll add some configuration to my portle
t.
If I use the SPI it will require 5.1.0.1 and I'm not sure if I should go dow
n that road just yet.

Here is a link to the Info Center for the SPI Model:

http://publib.boulder.ibm.com/infoc...n_modelxmp.html

Regards
Karin





[ Post a follow-up to this message ]



    Re: Can I get the page layout model in the portlet? Side-by-side or single page (under  
Dennis te Lintelo


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-30-06 02:47 AM

Karin,

Be also aware of the fact that I found it to be rather slow...This could be 
because I started from the portal root, but keep it in mind.

If you do have a piece of code which only takes care of the current page, I 
am very interested...:-)...

Thanks,
Dennis





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:02 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register