Zimlet Developers Guide:Portal: Difference between revisions
No edit summary |
No edit summary |
||
Line 224: | Line 224: | ||
==== <html> ==== | ==== <html> ==== | ||
The <code><html></code> element wraps the HTML code for the portal page layout. | |||
<pre> | |||
<html><![CDATA[ | |||
... your HTML code ... | |||
]]></html> | |||
</pre> | |||
{{Article Footer|Zimbra Collaboration Suite 6.0|12/29/2009}} | {{Article Footer|Zimbra Collaboration Suite 6.0|12/29/2009}} |
Revision as of 17:28, 2 January 2010
![]() |
Introduction | ![]() |
Getting Started | ![]() |
Dev Environment Setup | ![]() |
Developing Zimlets | ![]() |
|
![]() |
API Specifications | ![]() |
Example Zimlets |
By enabling the Zimbra portal feature, a Home tab (is created that can be used as a portal landing-page in the Zimbra web client. This portal page can be configured to display zimlets as "portlets".
Enabling the Portal Feature
The portal feature can be enabled by setting the zimbraFeaturePortalEnabled
CoS to TRUE
using the zmprov
command. Additionally, you can set the portal name to be used.
To enable portal for a specific user:
- Open a terminal.
- Change to the zimbra user:
su - zimbra
- Set the portal feature COS to TRUE:
zmprov ma user@domain.com zimbraFeaturePortalEnabled TRUE
- Set the portal for the user to id "example":
zmprov ma user@domain.com zimbraPortalName example
Portal Files
A portal consists primarily of a manifest.xml
file that configures the portal "id" and defines which zimlets are used in the portal. The manifest also includes the base HTML layout for the portal page.
The manifest is file should be located in a directory name that matches the portal id and placed in the {zcs-install-dir}/jetty/webapps/zimbra/portals/{portal-id}
directory.
An example portal (where id="example") is provided at:
{zcs-install-dir}/jetty/webapps/zimbra/portals/example
Portal Manifest File Reference
The following provides a reference for the elements in the Portal Manifest File.
<portal>
The <portal>
element is the enclosing element in the Manifest File. The <portal>
element has the following attributes:
Attribute | Required / Optional | Range of Values | Default Value | Description |
id | Required | A valid portal id. | N/A | The id attribute is the portal id (or "portal name") and is a required attribute. This must be the same as the directory name for the portal. For example, {zcs-install-dir}/jetty/webapps/zimbra/portals/{portal-id}/manifest.xml .
|
The following table describes the elements you can define within a <portal>
element.
Order | Element | Required / Optional | Description |
1 | portlets | Required (1 allowed) | The element that describes the portlets to be used with the portal. See <portlets> for more information. |
2 | html | Required (1 allowed) | Describes the portal layout. See <html> for more information. |
<portlets>
This element defines the list of portlets used with the portal.
The following table describes the elements you can define within a <portlets>
element.
Order | Element | Required / Optional | Description |
1 | portlet | Required (1 or more allowed) | The element that describes the portlets to be used with the portal. See <portlet> for more information. |
<portlet>
This element defines the zimlet, panel and properties (if applicable) for the portal. The <portlet>
element has the following attributes:
Attribute | Required / Optional | Range of Values | Default Value | Description |
zimlet | Required | A valid zimlet name. | N/A | The name of the zimlet to use as this portlet. |
The following table describes the elements you can define within a <portlet>
element.
Order | Element | Required / Optional | Description |
1 | panel | Required (1 allowed) | Defines the panel for the portal. See <panel> for more information. |
2 | property | Optional (0 or more allowed) | Properties for the zimlet. See <property> for more information. |
Example:
<portlet zimlet="com_zimbra_html"> <panel id="portlet_panel_id_1" /> <property name="url">/zimbra/portals/example/dynamic.jsp</property> <property name="refresh">30000</property> </portlet>
<panel>
This element defines the panel for the portlet. The <panel>
element has the following attributes:
Attribute | Required / Optional | Range of Values | Default Value | Description |
id | Required | A valid id. | N/A | The id of the panel for this portlet. This id is used in the HTML layout for the portal page to designate where the portal displays. |
Example:
<panel id="portlet_panel_id_1" />
<property>
The <property>
element is used to define properties to pass to the zimlet. The content of the element is the value of the parameter.
The <property>
element has the following attributes:
Attribute | Required / Optional | Range of Values | Default Value | Description |
name | Required | A attribute name | N/A | Specifies the property name |
Example:
<property name="myprop">thisismyprop</property>
<html>
The <html>
element wraps the HTML code for the portal page layout.
<html><![CDATA[ ... your HTML code ... ]]></html>