Skip to content

Commit

Permalink
Merge branch '3016-template-tweaks' of github.com:okfn/ckan into 3016…
Browse files Browse the repository at this point in the history
…-template-tweaks
  • Loading branch information
Sean Hammond committed Dec 13, 2012
2 parents b21831c + 9ef5dab commit 34abccc
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions ckan/config/routing.py
Expand Up @@ -23,14 +23,23 @@ class Mapper(_Mapper):
via some helper functions like build_nav(). '''

def connect(self, *args, **kw):
''' This is like the standard connect except it also takes some
custom parameters.
'''Connect a new route, storing any named routes for later.
:param ckan_icon: the icon to be associated with this route
This custom connect() method wraps the standard connect() method,
and additionally saves any named routes that are connected in a dict
ckan.routing.named_routes, which ends up being accessible via the
Pylons config as config['routes.named_routes'].
Also takes some additional params:
:param ckan_icon: name of the icon to be associated with this route,
e.g. 'group', 'time'
:type ckan_icon: string
:param highlight_actions: actions that should be treated as the same
as this for menu highlighting purposes
:type highlight_actions: string space separated action names
:param highlight_actions: space-separated list of controller actions
that should be treated as the same as this named route for menu
highlighting purposes, e.g. 'index search'
:type highlight_actions: string
'''
ckan_icon = kw.pop('ckan_icon', None)
highlight_actions = kw.pop('highlight_actions', kw.get('action', ''))
Expand Down

0 comments on commit 34abccc

Please sign in to comment.