[Erp5-report] r8109 - /erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jun 20 18:37:12 CEST 2006
Author: kevin
Date: Tue Jun 20 18:37:12 2006
New Revision: 8109
URL: http://svn.erp5.org?rev=8109&view=rev
Log:
This is an attempt to create a generic script to get logical structure of a web site.
Added:
erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getSiteMap.xml
Added: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getSiteMap.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getSiteMap.xml?rev=8109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getSiteMap.xml (added)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getSiteMap.xml Tue Jun 20 18:37:12 2006
@@ -1,0 +1,179 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <tuple>
+ <string>Products.PythonScripts.PythonScript</string>
+ <string>PythonScript</string>
+ </tuple>
+ <none/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Python_magic</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>__ac_local_roles__</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_container</string> </key>
+ <value> <string>container</string> </value>
+ </item>
+ <item>
+ <key> <string>name_context</string> </key>
+ <value> <string>context</string> </value>
+ </item>
+ <item>
+ <key> <string>name_m_self</string> </key>
+ <value> <string>script</string> </value>
+ </item>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_body</string> </key>
+ <value> <string encoding="cdata"><![CDATA[
+
+"""\n
+ TODO: add parameters to filter by object type / object visibility (admin or not) and security\n
+"""\n
+\n
+# Get default site root if no root defined\n
+if site_root in (\'\', None):\n
+ site_root = context.WebSite_getSiteValue()\n
+\n
+# site_map is the tree of sections/subsections/documents of the web site.\n
+# Here is the description of data structure:\n
+# site_map = [ {} <- first_level object #1\n
+# , {} <- first_level object #2\n
+# , {\'sub-content\': []} <- first_level object #3 with sub objects\n
+# ]\n
+# {dict} contain properties of the object\n
+# [list] can be ordered\n
+\n
+site_map = [{ \'sub-content\':\'\'}]\n
+\n
+main_sections = site_root.WebSite_getMainSection()\n
+\n
+return repr(main_sections)\n
+
+
+]]></string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_filepath</string> </key>
+ <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getSiteMap</string> </value>
+ </item>
+ <item>
+ <key> <string>_owner</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>site_root=None</string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>site_root</string>
+ <string>None</string>
+ <string>_getattr_</string>
+ <string>context</string>
+ <string>site_map</string>
+ <string>main_sections</string>
+ <string>repr</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <tuple>
+ <none/>
+ </tuple>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>WebSite_getSiteMap</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
More information about the Erp5-report
mailing list