I recently made my first plugin using the IBlueprint interface, and have been using it successfully on CKAN 2.8. I attempted to deploy it to a system running 2.7.6 (we have postponed updating to 2.8 until a couple other items are ready, but though this would drop in) and encountered an issue with the build_nav_icon template helper function.
We are trying to add a dataset navigation menu entry, and the function call within my read_base.html template is:
h.build_nav_icon('relationships.read', _('Relationships'), dataset_id=pkg.name, icon='connectdevelop')
relationships.read links to a blueprint entry, and this all works on 2.8, but 2.7 returns:
File '/usr/lib/ckan/default/src/ckanext-relationshipdisplay/ckanext/relationshipdisplay/templates/package/read_base.html', line 5 in block "content_primary_nav" {{ h.build_nav_icon('relationships.read', _('Relationships'), dataset_id=pkg.name, icon='connectdevelop')}}
File '/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py', line 672 in build_nav_icon return _make_menu_item(menu_item, title, **kw)
File '/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py', line 729 in _make_menu_item raise Exception('menu item
%s
cannot be found' % menu_item)Exception: menu item
relationships.read
cannot be found
Looking at the CKAN code a bit it appears the make_menu_item function only references pylons based routes. Is there a workaround to make this work on 2.7 or something I may have overlooked in my plugin configuration?