Martin Sturm wrote:
Hi all,
I have a question regarding Layout portlets. I've created a portlet
which provides a layout for Jetspeed and is using the MultiColumnPortlet
(in fact, my portlet only consists of some different init-params in the
portlet.xml). Our layout requires a different template, which is
currently located in the custom portal in WEB-INF/templates/layout/html/
(as is by default).
However, for deployment reasons, it would be very nice if the template
files (effectively only a layout.vm and layout.properties file) would
also be contained in the portlet.
I figured out that the location of the template-location is provided by
a TemplateLocator which is used by the JetspeedPowerTool. However, it is
very unclear to me how I can change its behaviour so that four our
Layout Portlet it uses a location which is part of my Layout Portlet.
Unfortunately, it is hard to find useful documentation on this subject,
so I hope somebody on this mailinglist can provide some help.
Hi Martin,
If I understand you correctly, you'd like to package your custom layout
template together with your custom layout portlet, right?
First question here is: are you deploying your custom layout portlet(s) as a
separate war within the *local* deployment environment of Jetspeed?
Like the default Jetspeed layout portlets, custom layout portlets are best deployed through the special WEB-INF/deploy/local folder, not the
default WEB-INF/deploy folder. Using the local deployment folder the custom layout portlets will be managed within the Jetspeed portal
webapp itself, thereby accessible from within its own context and through its own classpath.
While the current TemplateLocator configuration assumes a single *root* folder within the portal web application context, it might be
possible to adapt this to (also) look in an additional/separate folder, like within a locally deployed layout portlet application.
However, I'd consider this to be a less optimal and desired solution.
An alternative solution we've setup before for other projects is configuring a special but generic layout template which simply delegates
(invokes) the layout template rendering to one tied to a predefined or dynamically resolved one provide by (package together with) the
layout decorator itself.
That way, you can leverage the automatic decorator deployment feature of Jetspeed which allows you to package decorators (both layout and
portlet) as a jar and just drop it in the portal WEB-INF/deploy folder. That makes for a more generic and reusable solution imo.
Or, a new "template" deployment feature for Jetspeed can be written which will even further generalize and simplify your environment. Such a
feature has not yet been needed, but we'd be happy to integrate a provided patch for that in Jetspeed, or otherwise provide such a feature
by ourselves if you can help us find some sponsor for this.
Regards,
Ate
We're using Jetspeed 2.1.3 POST.
Thanks in advance!!
Kind regards,
--
Martin Sturm
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]