RE: How to Embedding functional portlet into web content article in lifera

lokesh gorrela, modified 8 Years ago. Regular Member Posts: 173 Join Date: 3/9/16 Recent Posts
Hi Guys,

I want to embedding functional portlet into web content article by using Free Marker Template language in liferay 7.

I used below tag in my web content article:
<runtime-portlet name="feedback_WAR_FeedbackManagementSystemportlet" instance="MhfldVk6rFqB" queryString=""/>

But this tag is not working in liferay 7 web content article.

Anyone knows about this requirement please give replay to me.




Thanks
With Regards
Lokesh
Satish Upadhya, modified 7 Years ago. New Member Posts: 6 Join Date: 5/31/17 Recent Posts
Hi Lokesh,

Did you find any solution for this??

Please share it to help others.

Thanks,
Satish
Soumyashree Mishra, modified 7 Years ago. Junior Member Posts: 32 Join Date: 4/18/16 Recent Posts
Hi,

Liferay has removed the support of using runtime-portlet tag to embed portlet in a web content article in Liferay 7.

Refer below link:

https://dev.liferay.com/develop/reference/-/knowledge_base/7-0/breaking-changes#removed-support-for-runtime-portlet-tag-in-body-of-web-content-articles

Regards,
Soumya
lokesh gorrela, modified 7 Years ago. Regular Member Posts: 173 Join Date: 3/9/16 Recent Posts

Hi Satish Upadhya,

 

Actually my requirement is  send form data from web content to my  custom portlet.

I followed below steps and done my requirement.

Step1: Create a functional portlet with controll logic.

Step2: Add following property in your portal-ext.properties file and restart Liferay portal server.

                Ex:  portlet.add.default.resource.check.whitelist=3,56_INSTANCE_0000

Step3: Drag and Drop Liferay web content Display portlet in your desired page

              I have  create a one form using below code,

        <form action="#" enctype="text/plain" method="post">Receiver Name:<br />
<input id="receiverName" name="receiverName" type="text" value="" /><br />
Receiver Email:<br />
<input id="receiverEmail" name="receiverEmail" type="text" value="" /><br />
Sender Name:<br />
<input id="senderName" name="senderName" type="text" value="" /><br />
Sendw Email:<br />
<input id="senderMail" name="senderMail" type="text" value="" /><br />
Subject<br />
<input id="mailSubject" name="mailSubject" type="text" value="" /><br />
Mail Body<br />
<textarea cols="50" id="mailBody" name="mailBody" rows="4"></textarea><br />
<br />
<input id="mailSend" type="button" value="mailSend" /> <input type="reset" value="Reset" />&nbsp;</form>
</div>

 

//aui ajax call to get updated content
A.io.request('http://localhost:8080/?p_p_id=AjaxMailSender_WAR_AjaxMailSenderportlet&p_p_lifecycle=2',{

//write your code here

}

 

Step4: <add-default-resource>true</add-default-resource> to your portlet in liferay-portlet.xml.

 

Finally, I sent the data from web content article  to my custom portlet and performed operations in my custom portlet.

Note: Here I explained only, How I provide communication between web content article to my custom portlet.

 

Thanks&Regard's

Lokesh

Mohamed Saleem, modified 7 Years ago. Junior Member Posts: 40 Join Date: 12/16/15 Recent Posts

Hi Lokesh,

         Create one portlet and Embed your web content and create url in that portlet jsp.

Embed web content

 
<liferay-ui:journal-article
 
  articleId="<%=articleId%>"
 
  groupId="<%=groupId%>" />
 
 
Regards,
Saleem