source: products/qSiloGroup/tags/0.1.0/skins/qSiloGroup/getSiloNavigationDictionary.py @ 1

Last change on this file since 1 was 1, checked in by myroslav, 19 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 643 bytes
Line 
1## Controller Python Script "getSiloNavigationDictionary"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##title=Update Folder Property
8##parameters=
9#
10
11if context.portal_type in ['Folder', 'Large Plone Folder', 'CMFFolder']: CONTEXT = context
12else: CONTEXT = context.aq_parent
13
14items = CONTEXT.getProperty('silo_items',None)
15
16if not items:
17    return {}
18
19prop_dict = {}
20for i in items:
21    s = map(str, i.split('|'))
22    try:
23        if s[1]: s[1] = '/'+s[1]
24        prop_dict[s[0]] = {'id': s[0], 'path':s[0]+s[1], 'title':s[2]}
25    except: continue
26
27return prop_dict
Note: See TracBrowser for help on using the repository browser.