有没有办法做gsp partials而不是标签库? [英] Is there a way to do gsp partials rather than tag libraries?

查看:130
本文介绍了有没有办法做gsp partials而不是标签库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢freemarker的一件事是,您可以快速创建封装复杂html的新宏,以使页面更小,更简洁。我需要在grails中做标记库来完成同样的事情,还是需要一个非常轻量级的语法来实现相同的目标? div>

有一个< g:render> 标签,它可能符合您的需求。这是此处


One of the things I liked about freemarker is that you can quickly create new macros that encapsulate complex html to make the pages smaller and more concise. Do I have to make tag libraries to do the same thing in grails, or is there a really light-weight syntax for achieving the same thing?

解决方案

There is a <g:render> tag, which may match your needs. It's documented here.

这篇关于有没有办法做gsp partials而不是标签库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆