diff --git a/dotCMS/src/main/java/com/dotmarketing/velocity/directive/ContentletDetail.java b/dotCMS/src/main/java/com/dotmarketing/velocity/directive/ContentletDetail.java index 44a8de74061d..e73f691e22b1 100644 --- a/dotCMS/src/main/java/com/dotmarketing/velocity/directive/ContentletDetail.java +++ b/dotCMS/src/main/java/com/dotmarketing/velocity/directive/ContentletDetail.java @@ -54,13 +54,15 @@ else if(type.baseType() == BaseContentType.WIDGET && !Config.getBooleanProperty throw new ResourceNotFoundException("cannnot find contentlet id " + argument + " lang:" + params.language); } + boolean showWorking = false; - return (params.live) - ? "/live/" + argument + "_" + cv.getLang() + "." + EXTENSION - : "/working/" + argument + "_" + cv.getLang() + "." + EXTENSION; - - + if (context.get("_show_working_") != null && (boolean)context.get("_show_working_")) { + showWorking = true; + } + return (params.live && !showWorking) + ? "/live/" + argument + "_" + cv.getLang() + "." + EXTENSION + : "/working/" + argument + "_" + cv.getLang() + "." + EXTENSION; } }