aspose file tools*
The moose likes Struts and the fly likes Velocity define #set variable and use in inner #macro Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Velocity define #set variable and use in inner #macro" Watch "Velocity define #set variable and use in inner #macro" New topic
Author

Velocity define #set variable and use in inner #macro

Dalton Camargo
Greenhorn

Joined: Mar 04, 2004
Posts: 2
How I cant define #set variable and use in inner #macro??
For instance:

I have a file with variables and macros

#set ($bg1 = "#FFFFFF")
#set ($bg = "#000000")

#macro (Test $text)
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="9"><tr><td>
<table width="100%" border="0" cellspacing="1" cellpadding="8" bgcolor="$bg"><tr><td>
#end


But this don't work!

Well, if is dont are possible, have other way?

Anybody can help me?


Dalton Milkvicz de Camargo<br />SCJP 1.4<br />Porto Alegre - Brasil<br /><a href="http://www.javafree.com.br" target="_blank" rel="nofollow">http://www.javafree.com.br</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Velocity define #set variable and use in inner #macro