Skip to content

Commit

Permalink
[#1996] Fix featured group link.
Browse files Browse the repository at this point in the history
URL was previously set as a jinja template variable, but was being
called inside a child block of the template, so the var was out of
scope and coming up empty. See:
http://jinja.pocoo.org/docs/dev/templates/#block-nesting-and-scope
  • Loading branch information
brew committed Oct 24, 2014
1 parent 2f512bf commit 5101c1c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ckan/templates/snippets/group_item.html
Expand Up @@ -2,17 +2,16 @@
<section class="group-list module module-narrow module-shallow">
{% block group_item_header %}
<header class="module-heading">
{% set url=h.url_for(controller='group', action='read', id=group.name) %}
{% set truncate=truncate or 0 %}
{% set truncate_title = truncate_title or 0 %}
{% set title = group.title or group.name %}
{% block group_item_header_image %}
<a class="module-image" href="{{ url }}">
<a class="module-image" href="{{ h.url_for(controller='group', action='read', id=group.name) }}">
<img src="{{ group.image_display_url or h.url_for_static('/base/images/placeholder-group.png') }}" alt="{{ group.name }}" />
</a>
{% endblock %}
{% block group_item_header_title %}
<h3 class="media-heading"><a href="{{ url }}">{{ group.title or group.name }}</a></h3>
<h3 class="media-heading"><a href="{{ h.url_for(controller='group', action='read', id=group.name) }}">{{ group.title or group.name }}</a></h3>
{% endblock %}
{% block group_item_header_description %}
{% if group.description %}
Expand Down

0 comments on commit 5101c1c

Please sign in to comment.