Fix for broken urls in blog list

This actually undoes commits 90c62664a6 and 18fe240b93 and simply adds the node.url property when rendering a post in the posts_view function. This is what the template macro actually expected in the first place.
This commit is contained in:
2018-01-18 16:02:29 +01:00
parent 2b2910a1ac
commit 4da7a84c86
2 changed files with 6 additions and 5 deletions

View File

@@ -35,7 +35,6 @@ def posts_view(project_id=None, project_url=None, url=None, *, archive=False, pa
api = system_util.pillar_api()
# Fetch project (for backgroud images and links generation)
# Fetch project (for background images and links generation)
if project_id:
project = Project.find(project_id, api=api)
@@ -78,6 +77,8 @@ def posts_view(project_id=None, project_url=None, url=None, *, archive=False, pa
if post.picture:
post.picture = get_file(post.picture, api=api)
post.url = url_for_node(node=post)
elif posts._items:
post = posts._items[0]
else: