but hello.inc maybe is a relative path
and it is difficult for $templateTool to decide
2010-04-25
bluejoe2008
发件人: Jarkko_Viinamäki-2
发送时间: 2010-04-25 15:26:25
收件人: user
抄送:
主题: Re: how to determine the included template file exists or not?
One option is to write a Java class for checking template existence and put
it in Velocity context as a tool.
#if( $templateTool.exists("hello.inc") )
#parse("hello.inc")
#end
bluejoe-2 wrote:
>
> how to determine the included template file exists or not? in my .vm
> page, i want to write such codes as follows:
>
> #set($var=$param("fileName"))
> #parse("${var}.inc")
>
--
View this message in context:
http://old.nabble.com/how-to-determine-the-included-template-file-exists-or-not--tp28354538p28354663.html
Sent from the Velocity - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]