[FreeMarker-user] variable not visible in included templates?
Generates text that depends on changing data (like dynamic HTML).
Brought to you by:
revusky
From: Chris M. <cme...@nc...> - 2003-04-26 04:08:10
|
I'm just getting started with FreeMarker and ran into problem - I have a template that #assigns some variables and then #includes another template. The 2nd template then attempts to use that variable but I get an error - "expression is undefined". Am I attempting the impossible? Or have I just missed the correct way to do it? the first template is: ------------------------------------------------------- <#global title="Wood Valley Homeowners Association"/> <#assign bob="BOB2"/> ${bob} <#-- The template to use for this page --> <#include "template-main.html"/> ------------------------------------------------------- the second template is: ------------------------------------------------------- <html> <head><title>${bob}</title></head> <body><p>Hello!</p></body> </html> ------------------------------------------------------- -- ********************************* Chris Merrill cme...@nc... ********************************* |