Fórumok

Blogs 'Attach Files' Feature - Liferay 6.0.6 CE

Sasikumar Lakshmanan, módosítva 11 év-val korábban

Blogs 'Attach Files' Feature - Liferay 6.0.6 CE

New Member Bejegyzések: 3 Csatlakozás dátuma: 2012.01.05. Legújabb bejegyzések
Hello All,
I am new to Liferay and need to customize the Blogs Portlet to add the 'Attach Files' feature similar to that in the Message Boards Portlet. Can you please guide me in doing so?
My environment:
- Liferay CE 6.0.6
- HSQL database (for my testing)

What I am planning to do?
- customize the Blogs Portlet to add the 'Attach Files' feature similar to that in the Message Boards / Forums Portlet.

What steps I have taken now?
- Added 'Attach Files' button to the Blogs Portlet.
- Followed the implementation of Message Boards and literally have copied the code to Blogs (Sorry, I don't have any experience in develping front end, but I am a core java person).



My changes are In edit_entry.jsp,
<%
String taglibOnClick = "document." + renderResponse.getNamespace() + "fm." + renderResponse.getNamespace() + "content.value = "    + renderResponse.getNamespace() + "getHTML(); document." + renderResponse.getNamespace() + "fm." + renderResponse.getNamespace() + "attachments.value = '" + !attachments + "'; submitForm(document." + renderResponse.getNamespace() + "fm);";
%>

<aui:button onClick="<%= taglibOnClick %>" value="<%= ((attachments) ? &quot;remove&quot; : &quot;attach&quot;) + &quot;-files&quot; %>" />


The 'attachments' boolean variable is false initially, but when this form is submitted the value should be set to true. I tried my level best to google this but I didn't find a valid answer.

Please guide me.

Thanks & Regards,
Sasi