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 />

3.1 Tipos <strong>de</strong> Plugins<br />

3.1.1 Theme<br />

Un Theme o Tema <strong>de</strong> Apariencia es un plugin que permite modificar el estilo o<br />

diseño <strong>de</strong> un portal web o <strong>de</strong> una página concreta.<br />

Cada Tema <strong>de</strong> Apariencia pue<strong>de</strong> disponer <strong>de</strong> una serie <strong>de</strong> Esquemas <strong>de</strong> color<br />

que permiten hacer variantes <strong>de</strong>l mismo Tema <strong>de</strong> Apariencia y mantenerlo<br />

todo en un mismo plugin. Por ejemplo, po<strong>de</strong>mos hacer que un Tema <strong>de</strong><br />

Apariencia tenga 2 variantes <strong>de</strong> tonalida<strong>de</strong>s, una en azul y otra en rojo.<br />

3.1.2 Layout<br />

Una Layout o Plantilla es un plugin que permite <strong>de</strong>finir una disposición <strong>de</strong><br />

página diferente para cada página. Son sobre ellas sobre las que se colocan los<br />

portlets y afectan única y exclusivamente al contenido central <strong>de</strong> la página. La<br />

cabecera, navegación principal y footer se <strong>de</strong>finirían directamente en el<br />

theme.<br />

Por ejemplo, po<strong>de</strong>mos tener plantillas <strong>de</strong> 2 columnas al 50%, 3 columnas al<br />

33%, 1 fila al 100% y 2 columnas al 50%, etc.<br />

3.1.3 Portlet<br />

Los Portlets son el componente principal <strong>de</strong> programación <strong>de</strong> <strong>Liferay</strong>.<br />

Funcionan como módulos in<strong>de</strong>pendientes y cada uno tiene una funcionalidad<br />

diferente. Cualquier código creado <strong>de</strong>ntro <strong>de</strong> un portlet no afectará nunca al<br />

código nativo <strong>de</strong>l portal. Por ejemplo, po<strong>de</strong>mos tener un portlet <strong>de</strong> Agenda,<br />

otro <strong>de</strong> Blog, otro <strong>de</strong> RSS, etc.<br />

<strong>Liferay</strong> dispone <strong>de</strong> numerosos Portlet nativos pero nosotros po<strong>de</strong>mos crear<br />

tantos como queramos para dar solución a todas nuestras necesida<strong>de</strong>s o<br />

modificar los que ya nos ofrece <strong>Liferay</strong> mediante Hooks<br />

3.1.4 Hook<br />

A diferencia <strong>de</strong> los portlets, este tipo <strong>de</strong> plugin permite modificar el código<br />

nativo <strong>de</strong>l portal. Se utilizan, sobretodo, para modificar el código <strong>de</strong> algún<br />

portlet nativo <strong>de</strong>l portal, <strong>de</strong>finir variables <strong>de</strong> idioma o modificar alguna<br />

funcionalidad <strong>de</strong>l portal.<br />

Existen 4 tipos <strong>de</strong> hooks principales:<br />

Custom JSPs: Permiten modificar el código <strong>de</strong> uno o varios portlets<br />

mediante la modificación <strong>de</strong> sus JSPs.<br />

Portal properties: Permiten modificar las propieda<strong>de</strong>s <strong>de</strong>l portal o <strong>de</strong>finir<br />

nuevas propieda<strong>de</strong>s.<br />

Visita www.chekis.es<br />

8

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

Saved successfully!

Ooh no, something went wrong!