Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Groovy by marc ( 15 years ago )
def contextPath = getContextPath(pluginName)
def templateUri
if (!contextPath) {
templateUri = contextPath + groovyPagesUriService.getViewURI(controllerName, templateName)
} else {
templateUri = groovyPagesUriService.getDeployedViewURI(controllerName, templateName)
}
protected getContextPath(pluginName) {
def contextPath = ""
if (pluginName) {
def plugin = PluginManagerHolder.pluginManager.getGrailsPlugin(pluginName)
if (plugin && !plugin.isBasePlugin()) {
contextPath = plugin.pluginPath + "/grails-app/views"
}
}
contextPath
}
Revise this Paste