Skip to content
Snippets Groups Projects
Commit 45e1429e authored by anonymous's avatar anonymous
Browse files

Adds example for static content with link in main navigation

parent f0e7f2a1
No related branches found
No related tags found
No related merge requests found
import ckan.lib.base as base
from ckan.controllers.home import HomeController
class OdshRouteController(HomeController):
def info_page(self):
return base.render('info_page.html')
\ No newline at end of file
......@@ -14,6 +14,7 @@ def odsh_main_groups():
class OdshPlugin(plugins.SingletonPlugin):
plugins.implements(plugins.IConfigurer)
plugins.implements(plugins.ITemplateHelpers)
plugins.implements(plugins.IRoutes, inherit=True)
# IConfigurer
......@@ -27,3 +28,7 @@ class OdshPlugin(plugins.SingletonPlugin):
# extension they belong to, to avoid clashing with functions from
# other extensions.
return {'odsh_main_groups': odsh_main_groups}
def before_map(self, map):
map.connect('info_page', '/info_page', controller='ckanext.odsh.controller:OdshRouteController', action='info_page')
return map
......@@ -2,3 +2,18 @@
{% block header_account_container_content %}
hier war der login
{% endblock %}
{% block header_site_navigation %}
<nav class="section navigation">
<ul class="nav nav-pills">
{% block header_site_navigation_tabs %}
{{ h.build_nav_main(
('search', _('Datasets')),
('organizations_index', _('Organizations')),
('group_index', _('Groups')),
('about', _('About')),
('info_page', _('Info'))
) }}
{% endblock %}
</ul>
</nav>
{% endblock %}
\ No newline at end of file
info
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment