diff --git a/network-api/networkapi/templates/pages/buyersguide/base.html b/network-api/networkapi/templates/pages/buyersguide/base.html index def39a4650e..b40da393508 100644 --- a/network-api/networkapi/templates/pages/buyersguide/base.html +++ b/network-api/networkapi/templates/pages/buyersguide/base.html @@ -6,8 +6,16 @@ {% block page_title %} {% environment_prefix %} - {% if pageTitle %}{{ pageTitle }} - {% else %}{% blocktrans context "“*Privacy Not Included” can be localized. This is a reference to the “*batteries not included” mention on toys." %}*Privacy Not Included | Shop smart and safe{% endblocktrans %} | Mozilla Foundation{% endif %} + {# if routable page #} + {% if pageTitle %} + {{ pageTitle }} + {# if custom seo_title for a wagtail page #} + {% elif page.seo_title %} + {{ page.seo_title }} + {# default to page.title #} + {% else %} + {{ page.title }} | {% blocktrans context "“*Privacy Not Included can be localized. This is a reference to the “*batteries not included” mention on toys." %}*Privacy Not Included{% endblocktrans %} + {% endif %} {% endblock %} {# TODO: consider using a different ga_identifier? #} diff --git a/network-api/networkapi/wagtailpages/pagemodels/buyersguide/homepage.py b/network-api/networkapi/wagtailpages/pagemodels/buyersguide/homepage.py index e8d02d0e166..040af71d100 100644 --- a/network-api/networkapi/wagtailpages/pagemodels/buyersguide/homepage.py +++ b/network-api/networkapi/wagtailpages/pagemodels/buyersguide/homepage.py @@ -185,7 +185,7 @@ def about_page(self, request): context["pagetype"] = "about" context["pageTitle"] = pgettext( "*Privacy Not Included can be localized.", - "How to use *Privacy Not Included", + "How to use *Privacy Not Included | Mozilla Foundation", ) return render(request, "pages/buyersguide/about/how_to_use.html", context) @@ -195,7 +195,7 @@ def about_why_page(self, request): context["pagetype"] = "about" context["pageTitle"] = pgettext( "*Privacy Not Included can be localized.", - "Why we made *Privacy Not Included", + "Why we made *Privacy Not Included | Mozilla Foundation", ) return render(request, "pages/buyersguide/about/why_we_made.html", context) @@ -208,7 +208,7 @@ def about_press_page(self, request): + " | " + pgettext( "This can be localized. This is a reference to the “*batteries not included” mention on toys.", - "*Privacy Not Included", + "*Privacy Not Included | Mozilla Foundation", ) ) return render(request, "pages/buyersguide/about/press.html", context) @@ -222,7 +222,7 @@ def about_contact_page(self, request): + " | " + pgettext( "This can be localized. This is a reference to the “*batteries not included” mention on toys.", - "*Privacy Not Included", + "*Privacy Not Included | Mozilla Foundation", ) ) return render(request, "pages/buyersguide/about/contact.html", context) @@ -236,7 +236,7 @@ def about_methodology_page(self, request): + " | " + pgettext( "This can be localized. This is a reference to the “*batteries not included” mention on toys.", - "*Privacy Not Included", + "*Privacy Not Included | Mozilla Foundation", ) ) return render(request, "pages/buyersguide/about/methodology.html", context) @@ -250,7 +250,7 @@ def about_contest(self, request): + " | " + pgettext( "This can be localized. This is a reference to the “*batteries not included” mention on toys.", - "*Privacy Not Included", + "*Privacy Not Included | Mozilla Foundation", ) ) return render(request, "pages/buyersguide/contest.html", context) @@ -309,7 +309,7 @@ def categories_page(self, request, slug): context["category"] = slug context["current_category"] = category context["products"] = products - context["pageTitle"] = f'{category.name} | {gettext("Privacy & security guide")}' f" | Mozilla Foundation" + context["pageTitle"] = f'{category.name} | {gettext("Privacy & Security Guide")}' f" | Mozilla Foundation" context["template_cache_key_fragment"] = f"{category.slug}_{request.LANGUAGE_CODE}" # Checking if category has custom metadata, if so, update the share image and description.