Skip to content

Commit

Permalink
Simplify template by using default filter
Browse files Browse the repository at this point in the history
  • Loading branch information
36degrees committed Jun 10, 2024
1 parent 0b4a917 commit fc704d1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% from "../../macros/attributes.njk" import govukAttributes -%}

<a href="{% if params.href %}{{ params.href }}{% else %}#{% endif %}" class="govuk-back-link {%- if params.classes %} {{ params.classes }}{% endif %}"
<a href="{{ params.href | default('#') }}" class="govuk-back-link {%- if params.classes %} {{ params.classes }}{% endif %}"
{{- govukAttributes(params.attributes) }}>
{{- params.html | safe if params.html else (params.text if params.text else "Back") -}}
{{- params.html | safe if params.html else (params.text | default("Back")) -}}
</a>

0 comments on commit fc704d1

Please sign in to comment.