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 | |
---|
11 | if context.portal_type in ['Folder', 'Large Plone Folder', 'CMFFolder']: CONTEXT = context |
---|
12 | else: CONTEXT = context.aq_parent |
---|
13 | |
---|
14 | items = CONTEXT.getProperty('silo_items',None) |
---|
15 | |
---|
16 | if not items: |
---|
17 | return {} |
---|
18 | |
---|
19 | prop_dict = {} |
---|
20 | for 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 | |
---|
27 | return prop_dict |
---|
Note: See
TracBrowser
for help on using the repository browser.