<divth:switch="${user.role}"> <pth:case="'admin'">User is an administrator</p><pth:case="#{roles.manager}">User is a manager</p> </div>
<divth:switch="${user.role}"> <pth:case="'admin'">User is an administrator</p><pth:case="#{roles.manager}">User is a manager</p><pth:case="*">User is some other thing</p> </div>
<scriptth:inline="javascript"> var username = /*[[ #{test} ]]*/; var name = /*[[ ${param.name[0]}+${execInfo.templateName}+'-'+${#dates.createNow()}+'-'+${#locale} ]]*/; </script>
1 2 3 4 5 6 7 8 9 10 11
<scriptth:inline="javascript">
/*<![CDATA[*/
var username = [[#{test}]];
var name = [[${param.name[0]}+${execInfo.templateName}+'-'+${#dates.createNow()}+'-'+${#locale}]];
/*]]>*/
</script>
adding code: /* [+…+]*/
1 2 3 4 5
var x = 23; /*[+ var msg = 'Hello, ' + [[${session.user.name}]]; +]*/ var f = function() { ...
removind code: /[- / and /* -]*/
1 2 3 4 5
var x = 23; /*[- */ var msg = 'This is a non-working template'; /* -]*/ var f = function() { ...
If you like this blog or find it useful for you, you are welcome to comment on it. You are also welcome to share this blog, so that more people can participate in it. If the images used in the blog infringe your copyright, please contact the author to delete them. Thank you !