[Erp5-report] r8112 - /erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jun 20 19:00:01 CEST 2006
Author: kevin
Date: Tue Jun 20 18:59:59 2006
New Revision: 8112
URL: http://svn.erp5.org?rev=8112&view=rev
Log:
If no default document is defined, return the document value instead of context.
Modified:
erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentValue.xml
Modified: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentValue.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentValue.xml?rev=8112&r1=8111&r2=8112&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentValue.xml (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentValue.xml Tue Jun 20 18:59:59 2006
@@ -72,7 +72,11 @@
if portal_type == \'Web Site\':\n
return None\n
if portal_type == \'Web Section\' and not getattr(context.REQUEST, \'editable_mode\', None):\n
- return context.WebSite_getDefaultDocumentValue()\n
+ document_value = context.WebSite_getDefaultDocumentValue()\n
+ if document_value == None:\n
+ # No default document is defined, return context as document value\n
+ return context\n
+ return document_value\n
return context\n
</string> </value>
</item>
@@ -125,6 +129,7 @@
<string>portal_type</string>
<string>None</string>
<string>getattr</string>
+ <string>document_value</string>
</tuple>
</value>
</item>
More information about the Erp5-report
mailing list