logo       

Re: Template inheritance: msg#00101

jakarta.velocity.user

Subject: Re: Template inheritance

Bill Chmura wrote:

If your master template has all the elements that will be needed, you
could just have your dervived templates set some variables to populate
it using a #set then a #parse to include the whole master template.

I don't think that gets you where you want to go, but it could get you
half way... You could abstract some of it out. I have not tried to
throw a lot of html into a set, but the theory works I think...

Hi Bill,

thanks for your tip.

I tried it with #parse. But instead of #set I use #macro ( PLACEHOLDER ) to get around the syntactical restrictions of #set. Macro definitions can take HTML fragments as they are. The references (=placeholders) then become macro calls. This is very close to what I intended.

cheers
Dirk


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise