Open Patrick1Rhode opened 4 years ago
@Patrick1Rhode @ccancellieri Can you try if this alternative approach works for you:
diff --git a/ckanext/pages/plugin/__init__.py b/ckanext/pages/plugin/__init__.py
index e688a38..9aad086 100644
--- a/ckanext/pages/plugin/__init__.py
+++ b/ckanext/pages/plugin/__init__.py
@@ -78,7 +78,8 @@ def build_pages_nav_main(*args):
else:
name = quote(page['name'])
title = html_escape(page['title'])
- link = tk.h.literal(u'<a href="/{}/{}">{}</a>'.format(type_, name, title))
+ url = tk.url_for('pages.{}_show'.format(type_), page=name)
+ link = tk.h.literal(u'<a href="{}">{}</a>'.format(url, title))
if page['name'] == page_name:
li = tk.literal('<li class="active">') + link + tk.literal('</li>')
else:
Also please keep the .gitignore
file
This fixes the handling of the ckan.root_path = {name} reported here #98.