1a107601fa490ca69215facceebe3d0dc5e7f1f8 | 6bcef0037bdb2d139a15065c3f31e872bae79df3 | ||
---|---|---|---|
238 | must also have its build() method called with the current path to | 238 | must also have its build() method called with the current path to |
239 | set self.path. This step is done automatically if the button is | 239 | set self.path. This step is done automatically if the button is |
240 | passed to a NavMenu instance upon its construction.""" | 240 | passed to a NavMenu instance upon its construction.""" |
241 | def __init__(self, title, dest, sr_path = True, opt = '', aliases = [], | 241 | def __init__(self, title, dest, sr_path = True, |
242 | style = "plain", **kw): | 242 | nocname=False, opt = '', aliases = [], |
243 | target = "", style = "plain", **kw): | ||
243 | 244 | ||
244 | # keep original dest to check against c.location when rendering | 245 | # keep original dest to check against c.location when rendering |
245 | self.aliases = set(a.rstrip('/') for a in aliases) | 246 | self.aliases = set(a.rstrip('/') for a in aliases) |
246 | self.aliases.add(dest.rstrip('/')) | 247 | self.aliases.add(dest.rstrip('/')) |
247 | self.dest = dest | 248 | self.dest = dest |
248 | 249 | ||
249 | Styled.__init__(self, style = style, sr_path = sr_path, | 250 | Styled.__init__(self, style = style, sr_path = sr_path, |
251 | nocname = nocname, target = target, | ||
250 | title = title, opt = opt, **kw) | 252 | title = title, opt = opt, **kw) |
251 | 253 | ||
252 | def build(self, base_path = ''): | 254 | def build(self, base_path = ''): |
... | ... | ||
295 | 'dest' defaults to the 'name' as well (unless specified | 297 | 'dest' defaults to the 'name' as well (unless specified |
296 | separately).""" | 298 | separately).""" |
297 | 299 | ||
298 | def __init__(self, name, sr_path = True, dest = None, **kw): | 300 | def __init__(self, name, sr_path = True, nocname=False, dest = None, **kw): |
299 | self.name = name.strip('/') | 301 | self.name = name.strip('/') |
300 | NavButton.__init__(self, menu[self.name], name if dest is None else dest, | 302 | NavButton.__init__(self, menu[self.name], name if dest is None else dest, |
301 | sr_path = sr_path, **kw) | 303 | sr_path = sr_path, nocname=nocname, **kw) |
302 | 304 | ||
303 | def selected_title(self): | 305 | def selected_title(self): |
304 | """Overrides selected_title to use menu_selected dictionary""" | 306 | """Overrides selected_title to use menu_selected dictionary""" |