问题
Usually i use this type of data in freemarker:
(root)
|
+- website = "StackOverflow"
|
+- href = "http://stackoverflow.com"
|
+- label = "my favorite website."
but today,a java programmer give me a model like this:
(root)
|
+- website = "StackOverflow"
|
+- href = "http://stackoverflow.com${dir}"
|
+- label = "my favorite website"
|
+- dir = "/questions/ask"
And he wants me to show dir's value in the final page. The template:
${label}<a href="${href}" >${website}</a>
i suggested him to write a template like this
${label}<a href="${href}${dir}" >${website}</a>
but he dont want to do like this.I want to ask if there any way to realize this requirement.
回答1:
${label}<a href="<@href?interpret/>" >${website}</a>
this is the answer
来源:https://stackoverflow.com/questions/3131093/can-freemarker-do-second-replacement