Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pass spring message with additional content to macro

I have written a macro that prints HTML output with passed value. Let's say:

<@myMacro 'foo'>

Right now I'd like to pass to this macro a message from .properties file.

<@spring.message code="key"/> // contains 'foo'

What I need is to pass value of key message with additional string like:

<@spring.message code="key"/>bar  // foobar

How can I do this to pass foobar to myMacro ?

Spring version: 2.5

like image 705
hsz Avatar asked Dec 27 '25 17:12

hsz


1 Answers

Solution was quite simple:

<#assign fooVar><@spring.message code="key"/>bar</#assign>
<@myMacro fooVar>
like image 127
hsz Avatar answered Dec 30 '25 23:12

hsz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!