You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Stefan Kuhn <sk...@ice.mpg.de> on 2002/03/22 13:43:12 UTC

Including new velocity variables in top.vm

Hi everybody,
in our project I need to include some additional data in the header of  the 
jetspeed website. I understood that this header is controlled by top.vm, 
which is called by default.vm. Because our data is not static and comes from 
a database, I need to put them in as velocity variables (or proporties or 
methods) which are retrieved by java code from the database. I understood 
that the values need to be put in the context by the class calling the 
template. And here is my problem: Which class is that? Where best put in the 
context.put() in order to have these values in top.vm?
I tried to find out it by myself but all these jetspeed classes are a bit too 
much for me :-)
Thanks for any advice
Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Including new velocity variables in top.vm

Posted by David Sean Taylor <da...@bluesunrise.com>.
If you can put it in a tool, that would be best.
You can have request, session, and global tools
Its documented on the Turbine site, but I cant find it right now
See http://jakarta.apache.org/turbine/turbine-2/pullmodel.html for an
overview

See the TR.p section on tools for examples

> -----Original Message-----
> From: Stefan Kuhn [mailto:skuhn@ice.mpg.de] 
> Sent: Friday, March 22, 2002 4:43 AM
> To: Jetspeed Users List
> Subject: Including new velocity variables in top.vm
> 
> 
> Hi everybody,
> in our project I need to include some additional data in the 
> header of  the 
> jetspeed website. I understood that this header is controlled 
> by top.vm, 
> which is called by default.vm. Because our data is not static 
> and comes from 
> a database, I need to put them in as velocity variables (or 
> proporties or 
> methods) which are retrieved by java code from the database. 
> I understood 
> that the values need to be put in the context by the class 
> calling the 
> template. And here is my problem: Which class is that? Where 
> best put in the 
> context.put() in order to have these values in top.vm?
> I tried to find out it by myself but all these jetspeed 
> classes are a bit too 
> much for me :-)
> Thanks for any advice
> Stefan
> 
> --
> To unsubscribe, e-mail:   
> <mailto:jetspeed-user-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Including new velocity variables in top.vm

Posted by Chris Kimpton <ki...@yahoo.com>.
Hi,

--- Stefan Kuhn <sk...@ice.mpg.de> wrote:
> Hi everybody,
> in our project I need to include some additional data in the header
> of  the 
> jetspeed website. I understood that this header is controlled by
> top.vm, 
> which is called by default.vm. Because our data is not static and
> comes from 
> a database, I need to put them in as velocity variables (or
> proporties or 
> methods) which are retrieved by java code from the database. I
> understood 
> that the values need to be put in the context by the class calling
> the 
> template. And here is my problem: Which class is that? Where best
> put in the 
> context.put() in order to have these values in top.vm?
> I tried to find out it by myself but all these jetspeed classes are
> a bit too 
> much for me :-)
> Thanks for any advice
> Stefan
> 

Does the content depend on the user/portlets being displayed too - or
just from the db?

If just from the db, the I guess (?) you can create your own "Tool"
object and specify it in the JR.properties file - this should then
get loaded into the context automatically and be available in the
top.vm for your use.  Have a look at JetspeedTool.

HTH,
Chris

=====
http://www.soccer2002.org.uk - join in and win CA$H!

__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>