[OFBIZ-3719] Reverting DOCTYPE hardcoding from cmsevents. Giving control back to the template.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1628014 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -78,7 +78,10 @@ public class CmsEvents {
|
||||
|
||||
// is this a default request or called from a defined request mapping
|
||||
String targetRequest = (String) request.getAttribute("targetRequestUri");
|
||||
Debug.logInfo("The targetRequest is " + targetRequest , module);
|
||||
String actualRequest = (String) request.getAttribute("thisRequestUri");
|
||||
Debug.logInfo("The actualRequest is " + actualRequest , module);
|
||||
|
||||
if (targetRequest != null) {
|
||||
targetRequest = targetRequest.replaceAll("\\W", "");
|
||||
} else {
|
||||
@@ -102,6 +105,7 @@ public class CmsEvents {
|
||||
pathInfo = overrideViewUri;
|
||||
} else {
|
||||
pathInfo = request.getPathInfo();
|
||||
Debug.logInfo("The pathInfo is " + actualRequest , module);
|
||||
if (targetRequest.equals(actualRequest) && pathInfo != null) {
|
||||
// was called directly -- path info is everything after the request
|
||||
String[] pathParsed = pathInfo.split("/", 3);
|
||||
@@ -155,7 +159,7 @@ public class CmsEvents {
|
||||
if (!alias.startsWith("/")) {
|
||||
alias = "/" + alias;
|
||||
}
|
||||
|
||||
Debug.logInfo("WebPathAlias is set to " + alias , module);
|
||||
RequestDispatcher rd = request.getRequestDispatcher(request.getServletPath() + alias);
|
||||
try {
|
||||
rd.forward(request, response);
|
||||
@@ -175,6 +179,9 @@ public class CmsEvents {
|
||||
Locale locale = UtilHttp.getLocale(request);
|
||||
|
||||
// get the contentId/mapKey from URL
|
||||
|
||||
// If webpathalias is valid then system will never look for content id or mapKey.
|
||||
|
||||
if (contentId == null) {
|
||||
if (Debug.verboseOn()) Debug.logVerbose("Current PathInfo: " + pathInfo, module);
|
||||
String[] pathSplit = pathInfo.split("/");
|
||||
@@ -268,8 +275,6 @@ public class CmsEvents {
|
||||
// TODO: replace "screen" to support dynamic rendering of different output
|
||||
FormStringRenderer formStringRenderer = new MacroFormRenderer(UtilProperties.getPropertyValue("widget", "screen.formrenderer"), request, response);
|
||||
templateMap.put("formStringRenderer", formStringRenderer);
|
||||
//include DOCTYPE for cms screens
|
||||
writer.append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
|
||||
|
||||
// if use web analytics
|
||||
List<GenericValue> webAnalytics = delegator.findByAnd("WebAnalyticsConfig", UtilMisc.toMap("webSiteId", webSiteId), null, false);
|
||||
|
||||
Reference in New Issue
Block a user