I am having some problems to manage my templates since I need to parse one
template multiple times.

I have abstracted my content into several layers.

ContentType, Layout, Style and Language.
and categorised them in  <static>, <dynamic> content.

So I build my "RuntimeTemplates" by buildning the Layout first then adding
the Style and Language content categorized as <static>. In my servlets I
create the VelocityContext and do the final parsing adding all dynamic
content.

Since I need to parse the same template more than once I need to add \'es to
the #<directives> for the dynamic content so that aren't removed when I
parse the static content. This is becoming a *pain* in the arse :/. I have
made a webinterface where templates can be managed but \\ sign's are
converted to \ automatically by the webbrowsers. So each time i want to edit
a template i have to add a \ sign to all #parse, #for .. and so on.

A better solution would be something like this:

[template]
#if ( $c = 3 )
 wewq
#end

2#foreach ( $a in $as )
        dfdsfsd
2#end

[template] after one parse
 wewg

1#foreach ( $a in $as )
        dfdsfsd
1#end

[template] after two parses
 wewg

        dfdsfsd
        dfdsfsd


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to