Foros de discusión

Portal development

Shreyas A, modificado hace 12 años.

Portal development

New Member Mensajes: 16 Fecha de incorporación: 17/01/12 Mensajes recientes
1.How to remove the mandatory field names like portal name in the site settings page of the liferay portal 6.0?

2.How to change the field names in forums and blogs which are inbuilt?
Ex: how to change name of field add blog entry to name we want.
thumbnail
Juhi Kumari, modificado hace 12 años.

RE: Portal development

Expert Mensajes: 347 Fecha de incorporación: 12/12/11 Mensajes recientes
Hi Shreyas,

You can change the fields name by customizing the jsps of any portlet using hooks in liferay6.


Regards
Juhi
Shreyas A, modificado hace 12 años.

RE: Portal development

New Member Mensajes: 16 Fecha de incorporación: 17/01/12 Mensajes recientes
hi,

thanks for the reply but how to change the existing fields name?
Ex: how to change the field name "ADD BLOG ENTRY" to the name we want.
thumbnail
Juhi Kumari, modificado hace 12 años.

RE: Portal development

Expert Mensajes: 347 Fecha de incorporación: 12/12/11 Mensajes recientes
Hi Shreyas,

When you customize jsp using hooks, that time change the field name whatever you want.

Regards
Juhi
thumbnail
Dhandapani S, modificado hace 12 años.

RE: Portal development

Regular Member Mensajes: 176 Fecha de incorporación: 24/03/09 Mensajes recientes
Hi Shreyas,

You can follow below steps for creating hooks for changing the Add blog entry field name.

Step 1: Go to plugins/hooks create a folder with any name. eg blogs-hook

Step 2: Go to blogs-hook create folder docroot and build.xml file.

Content of build.xml should be like this:

<?xml version="1.0"?>

<project name="hook" basedir="." default="deploy">
<import file="../build-common-hook.xml" />
</project>

Step 3:


Go to blogs-hook/docroot create folder with name WEB-INF.

Step 4:

Now under WEB-INF create a file liferay-hook.xml and a folder with name jsps.

Step 5:


In liferay-hook.xml write following code.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 5.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_5_2_0.dtd">

<hook>
<custom-jsp-dir>/WEB-INF/jsps</custom-jsp-dir>
</hook>

Step 6:

Under jsps create folders html/portlet/portlet_name in our case portlet_name is blogs.

Step 7:


Under portlet_name create the same structure for the page which we want to modify.

Eg. In asset-publisher we will try to modify view_entries.jsp then structure will be

html/portlet/blogs/display/ view_entries.jsp

Step 8:


Customize the jsp file.

Step 9:


Go to plugins/hook

Do ant deploy

Step 10:Check the changes on server

For more info please go through the below URL :

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Custom+Attributes+and+JSP+Hooks



Please feel free to ask, if you have any queries....

I hope this post will be helpful to you....

Regards

Dhandapani S
Shreyas A, modificado hace 12 años.

RE: Portal development

New Member Mensajes: 16 Fecha de incorporación: 17/01/12 Mensajes recientes
Thanks Dandapani