Skip to content

Commit

Permalink
[#3026] Support icon param on nav_named_link helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Nov 30, 2012
1 parent 740a0d8 commit 4b225e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ckan/lib/helpers.py
Expand Up @@ -332,6 +332,11 @@ def _link_class(kwargs):

def nav_named_link(text, name, **kwargs):
class_ = _link_class(kwargs)

icon = kwargs.pop('icon', None)
if icon:
text = literal('<i class="icon-large icon-%s"></i> ' % icon) + text

return link_to(
text,
url_for(name, **kwargs),
Expand Down

0 comments on commit 4b225e6

Please sign in to comment.