Author: ashish
Date: Tue Apr 20 12:03:21 2010
New Revision: 935886
URL:
http://svn.apache.org/viewvc?rev=935886&view=revLog:
Applied patch from jira issue: OFBIZ-3719 - Include DOCTYPE at the begining of CMS driven html page.
Description of work:
Include DOCTYPE at the begining of html pages, that are render through cms.
Currently DOCTYPE is included in HtmlHead.ftl for cms.
By doing so the DOCT YPE is always included on the top of the page before rendering single HTML statement.
Thanks Deepak & Rishi for the contribution and Scott for the comments.
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
ofbiz/trunk/specialpurpose/cmssite/template/cms/HtmlHead.ftl
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java?rev=935886&r1=935885&r2=935886&view=diff==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java Tue Apr 20 12:03:21 2010
@@ -282,6 +282,8 @@ 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\">");
// render
if (UtilValidate.isEmpty(mapKey)) {
ContentWorker.renderContentAsText(dispatcher, delegator, contentId, writer, templateMap, locale, "text/html", null, null, true);
Modified: ofbiz/trunk/specialpurpose/cmssite/template/cms/HtmlHead.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/cmssite/template/cms/HtmlHead.ftl?rev=935886&r1=935885&r2=935886&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/cmssite/template/cms/HtmlHead.ftl (original)
+++ ofbiz/trunk/specialpurpose/cmssite/template/cms/HtmlHead.ftl Tue Apr 20 12:03:21 2010
@@ -16,7 +16,6 @@ KIND, either express or implied. See th
specific language governing permissions and limitations
under the License.
-->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<#assign initialLocale = locale.toString()>