Message Boards

Adding Portlet Programmatically in Content page

thumbnail
Aravinth Kumar, modified 2 Years ago.

Adding Portlet Programmatically in Content page

Regular Member Posts: 152 Join Date: 6/26/13 Recent Posts

Hi Team,

We are exploring on Liferay CONTENT pages like creating it programmatically, setting page templates, adding portlets to it, adding fragments. etc. We were able to create the page using page template, it works as expected.

We tried placing a portlet in content page but it doesnt show up in the page. Can someone suggest on this. 

API used to place a portlet:

1. Created fragment entry link

2. Added layout structure item in layout structure object

3. Updated layoutpagetemplatestructure. 

 

Regards,

Aravinth

 

 

 

Prathibha hallur, modified 2 Years ago.

RE: RE: Adding Portlet Programmatically in Content page

New Member Posts: 7 Join Date: 10/21/21 Recent Posts

@Mohammed Yasin,

Have you implemented site initializer , please can you provide more info. How do you initiate SI and did you also use SI for updates of site or only new site ?

thumbnail
Aravinth Kumar, modified 2 Years ago.

RE: Adding Portlet Programmatically in Content page

Regular Member Posts: 152 Join Date: 6/26/13 Recent Posts

Thanks for your response. Yes I used the above link and created the page, etc. Only I m not able to place a portlet onto a content page. 

I'm checking on liferay source code to understand the fragments and layoutstructures used in content page.

 

 

Prathibha hallur, modified 2 Years ago.

RE: RE: Adding Portlet Programmatically in Content page

New Member Posts: 7 Join Date: 10/21/21 Recent Posts

Hi Aravinth,

This is off topic,  I have a question - What type of  module (project template name) did you create for SI? 

 

Regards,

Prathibha