{% ckan_extends %}

{# Renaming datasets => data #}

{% block subtitle %}{{ _('Data') }}{% endblock %}

{% block breadcrumb_content %}
    <li>{% link_for _('Data'), named_route='dataset.search' %}</li>
  {% if g.pkg %}
    {% set dataset = g.pkg.title or g.pkg.name %}
    <li{{ self.breadcrumb_content_selected() }}>{% link_for dataset|truncate(30), named_route='dataset.read', id=g.pkg.name %}</li>
  {% else %}
    <li class="active"><a href="">{{ _('Create Dataset') }}</a></li>
  {% endif %}
{% endblock %}
{% ckan_extends %}

{# Renaming datasets => data #}

{% block subtitle %}{{ _('Data') }}{% endblock %}

{% block breadcrumb_content %}
    <li>{% link_for _('Data'), named_route='dataset.search' %}</li>
  {% if pkg %}
    {% set dataset = pkg.title or pkg.name %}
    <li{{ self.breadcrumb_content_selected() }}>{% link_for dataset|truncate(30), named_route='dataset.read', id=pkg.name %}</li>
  {% else %}
    <li class="active"><a href="">{{ _('Create Dataset') }}</a></li>
  {% endif %}
{% endblock %}

Correct issue with breadcrumb display
Correct issue with breadcrumb display

We were checking against g.pkg which didn't exist so we always showed
"Create Dataset" in the breadcrumb. The base.html in ckan defines a pkg
variable so we'll use that.
