Wednesday, 15 November 2017

Sharing Liferay Portlets to other websites

Sharing liferay portlets is very easy.Liferay provides easy way to bring our portlet in other portals and websites.

To share portlet

Click on configuration of the portlet.
For ex:Click on configuration of blogs portlet


Then under configuration click on sharing 

Now you will be seeing a script given in the box.Check allow users to add blogs to any website and save.

Select the script and put in any website code.It will bring you the portlet view there.From there you can add a blog now.

Same thing can be done for any portlets and even for our custom portlets.

Initially if you put the script it will not be displayed.

In browser console you will be getting

Refused to display in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

To resolve this you need to add
In portal-ext.properties

http.header.secure.x.frame.options=false 

and restart your server.It will work.By default it will be displayed.

TEST

I am Java Developer. I have 6 year Experiance in this field and like to post in blogging. So keep sharing and like my post

0 comments:

Post a Comment

 

Copyright @ 2017 Liferay Article.