source: products/qPloneDropDownMenu/branches/0.2/skins/qPloneDropDownMenu/qpdm_edit.py

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

Building directory structure

  • Property svn:eol-style set to native
File size: 577 bytes
Line 
1## Script (Python) "qpdm_edit"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters= submenu_path, idx
8##title=
9##
10
11req = context.REQUEST
12params = {}
13fields = ['title', 'url']
14
15for item in fields:
16    params[item] = str(req.get('i'+idx+'_'+item, None))
17
18from Products.CMFCore.utils import getToolByName
19
20menu_tool = getToolByName(context, 'portal_dropdownmenu')
21menuitem = menu_tool.getMenuItemByPath(submenu_path)
22
23menuitem.setTitle(params['title'])
24menuitem.setUrl(params['url'])
25
26return params
Note: See TracBrowser for help on using the repository browser.