开发者

Passing parameters between Velocity templates

开发者 https://www.devze.com 2023-03-17 13:54 出处:网络
I am trying to find out how to pass parameter while 开发者_运维技巧calling a velocity template from another.

I am trying to find out how to pass parameter while 开发者_运维技巧calling a velocity template from another.

it looks like this

File: _reading_tracker.vm

#parse("student/shared/_bio_data.vm")

I need to pass some arguments to the _bio_data.vm. Not sure how to do this


Instead of parsing _bio_data.vm, try creating a macro, and then calling that macro from _reading_tracker.vm.

Or, if you don't want to use a macro, then you should be able to #set($var="value") any number of variables in the outer template, and refer to those variables in the inner (parsed) template.

0

精彩评论

暂无评论...
验证码 换一张
取 消