De : Luc Dewavrin [mailto:luc_dewavrin@;yahoo.com]
>
> Hi,
>
> i am evaluating jetspeed and i have questions
> regarding the link between controls, portlet and
> templates.
>
Ok, I'll try to answer these...
> What i understood:
> - the default file describing the structure of a
> portlet is jetspeed.vm. This template is linked
> to "TitledPortletControl" in controls.xreg.
>
jetspeed.vm is the template associated to the default
PortletControl.
a PortletControl is a class that is responsible among
other things to "decorate" a portlet within a page in
a way suitable to the overall look and feel of the portal.
These controls are defined in /WEB-INF/conf/controls.xreg
where you found the mapping between the name "TitlePortletControl"
and the jetspeed.vm template which is were the actual markup
is defined.
> The problem is i don't see any association between
> portlets and TitlePortletControl in any configuration
> files.
>
Association between Portlet and PortletControl is done through
several means:
- there's a default control used for any portlet which is defined
in the /WEB-INF/conf/JetspeedResources.properties
(services.Portaltoolkit.default.control)
- in the Registry, a Portlet can have a "_control" parameter
that will make this specific portlet always use this control
- in the PSML page description files, a portlet can have
a <control> tag that will associate them only for this page
> Also, i was wondering if it is possible to associate
> a portlet with another velocity template than
> jetspeed.vm.
> I need to deeply customize my portlets
> and consequently need different portlets structures.
> It means i need to keep the default jetspeed.vm
> but need also another velocity template file for
> portlets with border and shadow.
>
> Is it possible? How can i manage to do it?
>
Of course, it's possible :)
A good starting point would be in my opinion:
1 Create a /WEB-INF/conf/local-controls.xreg like this
<registry>
<portlet-control-entry name="MyControl">
<classname>org.apache.jetspeed.portal.controls.VelocityPortletControl</class
name>
<parameter name="theme" value="mytemplate.vm"/>
<meta-info>
<title>Site Specific control</title>
</meta-info>
<media-type ref="html"/>
<media-type ref="wml"/>
</portlet-control-entry>
</registry>
2. Copy jetspeed.vm to mytemplate.vm and edit it as mush as you like
3. edit the file my.properties and add:
services.PortalToolkit.default.control=MyControl
>From now on, all the portlets will use your control by default unless
specifically
stated otherwise in PSML or the Portlet registry entry.
Hope this helps.
--
To unsubscribe, e-mail: <mailto:jetspeed-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-user-help@;jakarta.apache.org>