[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] RE: Overriding vars_and_comments function - side-effects?
> >
> > I need to be able to nest template variables. To do this
> > I will have to override the vars_and_comments function
> > that parses the variables and comments of the html pages.
>
>
> Can you give an example of what you are trying to do? I can't say
> that I fully understand your variable nesting requirement.
Example:
Templates
*************************************************************
Variable TEST1 <<EOV
test1
@_TEST2_@
EOV
Variable TEST2 <<EOV
test2
@_TEST3_@
EOV
Variable TEST3 <<EOV
test3
@_TEST4_@
EOV
Variable TEST4 <<EOV
test4
EOV
test.html:
*************************************************************
<html>
<body>
@_TEST1_@
</body>
</html>
RESULT:
*************************************************************
test1 test2 @_TEST3_@
Desired Result:
*************************************************************
test1 test2 test3 test4
There were two different solutions:
1) overwritten vars_and_comments to reiterate parsing until
no further substitutions
(currently only substitutes @@ once, @_ twice, and __ once)
2) using [var TEST* 2] also works
Thanks for suggestions
Alexandra