05.08.2013 Views

Guía básica de Liferay

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Guía</strong> <strong>básica</strong> <strong>de</strong> <strong>Liferay</strong><br />

Ahora <strong>de</strong>bemos ir al SRC <strong>de</strong> <strong>Liferay</strong> y buscar don<strong>de</strong> se encuentra el portlet a modificar,<br />

en nuestro caso el <strong>de</strong> blogs.<br />

Se encuentra en portal->portal-web->docroot->html->portlet->blogs.<br />

Para hacer el hook <strong>de</strong>bemos <strong>de</strong> copiar el archivo a modificar <strong>de</strong>l portlet, en este caso<br />

sería "view_entry_content.jsp", y copiarlo en nuestro hook pero <strong>de</strong> la siguiente<br />

manera:<br />

Debemos <strong>de</strong> reproducir toda la ruta <strong>de</strong>l archivo a modificar <strong>de</strong>l portlet en nuestro<br />

hook <strong>de</strong>s<strong>de</strong> la carpeta HTML a partir <strong>de</strong> /docroot/WEB-INF <strong>de</strong>l hook.<br />

En nuestro caso, el archivo view_entry_content.jsp <strong>de</strong>l portlet blogs a modificar esta<br />

en: /portal-web/docroot/html/portlet/blogs/view_entry_content.jsp<br />

Nuestro hook quedaría <strong>de</strong> la siguiente forma estructurado: MiHookhook/docroot/WEB-INF/html/portlet/blogs/view_entry_content.jsp.<br />

En<br />

view_entry_content.jsp es don<strong>de</strong> <strong>de</strong>bemos <strong>de</strong> copiar el código <strong>de</strong>l fichero <strong>de</strong>l portlet y<br />

es aquí don<strong>de</strong> modificaremos el código para que el hook sobrescriba las funciones <strong>de</strong>l<br />

portlet.<br />

Visita www.chekis.es<br />

24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!