开发者

can freemarker do second replacement

开发者 https://www.devze.com 2023-01-04 18:50 出处:网络
Usually i use this type of data in freemarker: (root) +- website = \"StackOverflow\" +- href = \"http://stac开发者_StackOverflow社区koverflow.com\"

Usually i use this type of data in freemarker:

(root)  
|  
+- website = "StackOverflow"  
|  
+- href = "http://stac开发者_StackOverflow社区koverflow.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.


${label}<a href="<@href?interpret/>" >${website}</a>

this is the answer

0

精彩评论

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