速度模板:如何将 #springMessage() 的结果放入速度变量中
我有一个来自这个语句的值:
#springMessage("count.french")
我需要附加到另一个字符串,就像
#set ( $theCount = '5467 ' )
本质上我需要这样做
#set ( $countText = $theCount+#springMessage("count.french") )
,但它不喜欢那样。有人知道如何做到这一点吗?
I have a value that comes out of this statement :
#springMessage("count.french")
That I need to append to another string like
#set ( $theCount = '5467 ' )
then essentially I need to do this
#set ( $countText = $theCount+#springMessage("count.french") )
but it doesn't like that. Anyone have any idea how to accomplish this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
创建临时变量应该像下面一样简单(注意引号):
然后,根据需要使用它,例如。将它连接到另一个字符串。
Creating a temp variable should be as simple as the following (note the quotes):
Then, use this however you want, ex. concat it to another string.
请尝试以下操作:
Try the following: