Changeset 846
- Timestamp:
- 04/18/07 10:01:03
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qSiloGroup/trunk/skins/qSiloGroup/getSiloNavigationDictionary.py
r740 r846 9 9 # 10 10 11 from Products.CMFCore.utils import getToolByName 12 11 13 if context.portal_type in ['Folder', 'Large Plone Folder', 'CMFFolder']: CONTEXT = context 12 14 else: CONTEXT = context.aq_parent … … 17 19 return {} 18 20 21 links = getToolByName(context, 'portal_catalog').searchResults(path="/".join(CONTEXT.getPhysicalPath()), portal_type="Link") 22 links_dict = {} 23 for l in links: 24 links_dict[l.getId] = l.getRemoteUrl 25 19 26 prop_dict = {} 20 27 for i in items: 21 28 s = map(str, i.split('|')) 29 id = s[0] 30 path = id 31 link = False 22 32 try: 23 33 if len(s) == 2: 24 34 title = s[1] 25 path = s[0]26 35 else: 27 if s[1]: s[1] = '/'+s[1]28 36 title = s[2] 29 path = s[0] + s[1] 30 prop_dict[s[0]] = {'id': s[0], 'path':path, 'title':title} 37 path += s[1] and ('/'+s[1]) or s[1] 38 if id in links_dict.keys(): 39 link = True 40 path = links_dict[id] 41 prop_dict[id] = {'id': id, 'path':path, 'title':title, 'link':link} 31 42 except: continue 32 43 qSiloGroup/trunk/skins/qSiloGroup/portlet_navigation.pt
r740 r846 19 19 <li class="navTreeItem visualNoMarker" 20 20 tal:define="item_id item/id; 21 item_title item/title "21 item_title item/title;" 22 22 tal:condition="python:item_id and item_id != default_page and item_title"> 23 23 <div> 24 24 <a tal:condition="item_title" 25 tal:attributes="href string:${silo/absolute_url}/${item/path};"25 tal:attributes="href python:test(item['link'], item['path'], silo.absolute_url()+'/'+item['path'])" 26 26 tal:content="item_title|nothing"> 27 27 Item Title</a>
