File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
src/java/org/codehaus/groovy/grails/plugins/web/taglib Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -472,19 +472,23 @@ class RenderTagLib implements com.opensymphony.module.sitemesh.RequestConstants
472472 def engine = groovyPagesTemplateEngine
473473 def uri = grailsAttributes. getTemplateUri(attrs. template,request)
474474 def var = attrs[' var' ]
475- def contextPath = attrs. contextPath ? attrs. contextPath : null
476-
477- if (attrs. plugin) {
478- contextPath = pluginManager?. getPluginPath(attrs. plugin) ?: ' '
479- }
480- else if (contextPath == null ) {
481- contextPath = pageScope. pluginContextPath ?: " "
482- }
483475
484476 Template t = TEMPLATE_CACHE [uri]
485477
486- def templatePath = " ${ contextPath}${ uri} "
487478 if (t== null ) {
479+ def contextPath = attrs. contextPath ? attrs. contextPath : null
480+
481+ if (attrs. plugin) {
482+ contextPath = pluginManager?. getPluginPath(attrs. plugin) ?: ' '
483+ }
484+ else if (contextPath == null ) {
485+ if (uri. startsWith(" /plugins/" )) contextPath = " "
486+ else {
487+ contextPath = pageScope. pluginContextPath ?: " "
488+ }
489+ }
490+ def templatePath = " ${ contextPath}${ uri} "
491+
488492 t = engine. createTemplateForUri([templatePath, " ${ contextPath} /grails-app/views/${ uri} " ] as String [])
489493 if (! engine. isReloadEnabled() && t!= null ) {
490494 def prevt = TEMPLATE_CACHE . putIfAbsent(uri, t)
You can’t perform that action at this time.
0 commit comments