Skip to content

Commit

Permalink
simplify canonical URL generation using Request.getLangUrl()
Browse files Browse the repository at this point in the history
  • Loading branch information
osma committed Aug 21, 2024
1 parent 6284b25 commit fba5bb1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/view/about.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% extends "base-template.twig" %}
{% block title %}{{ "About" | trans}} - {{ GlobalConfig.serviceName }}{% endblock %}
{% block description %}{{ GlobalConfig.aboutDescription(request.lang) }}{% endblock %}
{% block url %}{{ BaseHref }}{{ request.lang }}/about{% endblock %}
{% block url %}{{ BaseHref }}{{ request.langurl }}{% endblock %}

{% block content %}

Expand Down
2 changes: 1 addition & 1 deletion src/view/feedback.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{% block title %}{{ "Feedback"|trans }} - {{ GlobalConfig.serviceName }}{% endblock %}
{% block description %}{{ GlobalConfig.feedbackDescription(request.lang) }}{% endblock %}
{% block url %}{{ BaseHref }}{% if request.vocab %}{{ request.vocab.id }}/{% endif %}{{ request.lang }}/feedback{% endblock %}
{% block url %}{{ BaseHref }}{{ request.langurl }}{% endblock %}

{% block content %}

Expand Down
2 changes: 1 addition & 1 deletion src/view/landing.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% extends "base-template.twig" %}
{% block title %}{{ GlobalConfig.serviceNameLong(request.lang) }}{% endblock %}
{% block description %}{{ GlobalConfig.serviceDescription(request.lang) }}{% endblock %}
{% block url %}{{ BaseHref }}{{ request.lang }}/{% endblock %}
{% block url %}{{ BaseHref }}{{ request.langurl }}{% endblock %}

{% block content %}
<div class="col-md-7">
Expand Down
2 changes: 1 addition & 1 deletion src/view/vocab-home.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% extends "base-template.twig" %}
{% block title %}{{ vocab.title(request.contentLang) }} - {{ GlobalConfig.serviceName }}{% endblock %}
{% block description %}{{ vocab.config.description(request.contentLang) }}{% endblock %}
{% block url %}{{ BaseHref }}{{ vocab.id }}/{{ request.lang }}/{% if request.contentLang != request.lang and request.contentLang != '' and request.contentLang in vocab.config.languages %}?clang={{ request.contentLang }}{% endif %}{% endblock %}
{% block url %}{{ BaseHref }}{{ request.langurl }}{% endblock %}


{% block content %}
Expand Down
2 changes: 1 addition & 1 deletion src/view/vocab-search.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set pageType = 'vocab-search' %}
{% extends "base-template.twig" %}
{% block title %}'{{ term }}' - {{ vocab.shortName(request.contentLang) }} - {{ GlobalConfig.serviceName }}{% endblock %}
{% block url %}{{ BaseHref }}{{ vocab.id }}/{{ request.lang }}/search?clang={{ request.contentLang}}&amp;q={{ term|url_encode }}{% endblock %}
{% block url %}{{ BaseHref }}{{ request.langurl }}{% endblock %}

{% block content %}
<main class="searchpage py-5" id="main-container" >
Expand Down

0 comments on commit fba5bb1

Please sign in to comment.