Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2.0
-
None
Description
I think it hasn't been a good practice to use "#parse" macro in header.vm to use velocity macros with Velocity 1.5.
In the documentation of Velocity 1.5, it says, "because the #parse() happens at runtime, and the parser decides if a VM-looking element in the template is a VM at parsetime, #parse()-ing a set of VM declarations won't work as expected. To get around this, simply use the velocimacro.library facility to have Velocity load your VMs at startup." [1] By the way, we cannot use velocitymacro.library facility because each layout decorator should be able to have each own macros.
Luckily, by the way, Velocity 1.6 seems to have already resolved this problem!
It says, "Yes! This became possible in Velocity 1.6." in the same section. [2]
Therefore, I'd like to try to upgrade the velocity version to 1.6.3.
[1] http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#velocimacro_miscellany
[2] http://velocity.apache.org/engine/releases/velocity-1.6.2/user-guide.html#Velocimacro_Miscellany