When constructing the sidebar don't overide 'sidebar'
Instead specify 'sidebar_additional' and include it even if there
is a 'sidebar' defined.
Patch by: Sverre Rabbelier
--- a/app/soc/views/models/user_self.py Tue Jan 20 16:31:53 2009 +0000
+++ b/app/soc/views/models/user_self.py Tue Jan 20 17:41:47 2009 +0000
@@ -269,7 +269,7 @@
items = [('/' + 'notification/list', link_title, 'notification')]
new_params = {}
- new_params['sidebar'] = items
+ new_params['sidebar_additional'] = items
params = dicts.merge(params, new_params)
--- a/app/soc/views/sitemap/sidebar.py Tue Jan 20 16:31:53 2009 +0000
+++ b/app/soc/views/sitemap/sidebar.py Tue Jan 20 17:41:47 2009 +0000
@@ -74,7 +74,11 @@
# Return the found result
if params['sidebar']:
- return params['sidebar']
+ default = params['sidebar']
+ result = default[:]
+ for item in params['sidebar_additional']:
+ result.append(item)
+ return result
# Construct defaults manualy
defaults = params['sidebar_defaults']