velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph.R...@dlr.de
Subject Re: Theming with velocity
Date Thu, 15 May 2003 16:33:54 GMT
Hi Serge,

as I read Pauls request, it was how to have a per-user template
overriding mechanism...

Your suggestion lets an author override the defaults.

Serge Knystautas wrote:
> Herbert Poul wrote:
> 
>> Hi,
>> I would like to let users choose different themes. i think it is easy to
>> make something like#parse( "/themes/$user.theme/foo.vm" )
>> but i want that themes doesn't need to implement all .vm files, so when
>> /themes/$user.theme/foo.vm isn't found it should look for the file in 
>> e.g.
>> /themes/default/foo.vmIs this somehow possible with velocity ?
>>
>> I guess i need to extend the Parse class.. but how do i add it to the
>> directives (without editing directive.properties in the
>> velocity-dep-1.3.1.jar would be good) ?
>> cu
>>   Herbert Poul
> 
> 
> We've done something similar using a series of resource loaders.  The 
> top one is the content that's particular to a given user's site.  Below 
> that is another resource loader that loads predefined templates.  This 
> let's the author reference pages and know they'll be there, but override 
> those templates should they so desire.  Just a question of configuring 
> multiple loaders in a particular order.
> 

-- 
:) Christoph Reck


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message