开发者

Passing parameters between Velocity templates

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜