Andrew, Tim, Joe, others involved in the new CMS stuff,
After playing with the cmssite stuff I noticed that for decorated content all of the thisContent stuff was broken because it was finally rendered as a DataResource instead of a Content (to avoid the infinite recursion problems).
To fix this I changed the content map facade and content worker objects to work together to track a content with a decoratorContentId has already been decorated, this rendering the content and skipping the decorator content, using the isDecorated field.
This is in place now and is working. The main change in the decorator template is:
-${decoratedContent.data.render} +${decoratedContent}
Note that this also doesn't have the ".render" because the toString() method now does a render by default.
-David Begin forwarded message:
From: [EMAIL PROTECTED] Date: March 10, 2007 2:38:05 AM MST To: commits@ofbiz.apache.orgSubject: svn commit: r516669 - in /ofbiz/trunk: applications/ content/src/org/ofbiz/content/cms/ applications/content/src/org/ ofbiz/content/content/ applications/content/src/org/ofbiz/content/ webapp/ftl/ specialpurpose/cmssite/data/ specialpurpose/cmssite/ templa...Reply-To: dev@ofbiz.apache.org Author: jonesde Date: Sat Mar 10 01:38:03 2007 New Revision: 516669 URL: http://svn.apache.org/viewvc?view=rev&rev=516669 Log:Various cleanups in the cmsssite templates and data; implemented a change to support rendering the Content instead of the DataResource when it is decorated, which is necessary in order for the thisContent object to exist and function, which is necessary for including sub-content and such; also implemented the content map facade link element to get a link out of the context that the cms event puts in itModified:ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/ CmsEvents.java ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ ContentMapFacade.java ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ ContentWorker.java ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ ftl/TraverseSubContentTransform.javaofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml ofbiz/trunk/specialpurpose/cmssite/template/cms/MainDecorator.ftl ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/DemoFooter.ftl ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/DemoHeader.ftl ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/DemoHome.ftl
smime.p7s
Description: S/MIME cryptographic signature