Replace portal title with entity name
Store a short entity name instead of the full home heading so orgs can brand portals for sub-entities. Restore hero i18n composition and keep the English document title composed from the entity name. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -9,7 +9,7 @@ type CompliancePortal implements Node {
|
||||
websiteUrl: String
|
||||
email: String
|
||||
headquarterAddress: String
|
||||
title: String!
|
||||
entityName: String!
|
||||
|
||||
nonDisclosureAgreement: NonDisclosureAgreement @goField(forceResolver: true)
|
||||
|
||||
|
||||
@@ -134,7 +134,8 @@ func compliancePageHeadData() HeadDataFunc {
|
||||
|
||||
compliancePageBaseURL := complianceportal.CompliancePortalBaseURLFromContext(r.Context())
|
||||
|
||||
description := tc.Title
|
||||
pageTitle := "Compliance at " + tc.EntityName + "."
|
||||
description := pageTitle
|
||||
if tc.Description != nil && *tc.Description != "" {
|
||||
description = *tc.Description
|
||||
}
|
||||
@@ -142,7 +143,7 @@ func compliancePageHeadData() HeadDataFunc {
|
||||
htmlLang, canonical, hreflang := SEOFromRequest(r)
|
||||
|
||||
headData := HeadData{
|
||||
Title: tc.Title,
|
||||
Title: pageTitle,
|
||||
Description: description,
|
||||
HTMLLang: htmlLang,
|
||||
OGURL: canonical,
|
||||
|
||||
@@ -29,7 +29,7 @@ func NewCompliancePortal(cp *coredata.CompliancePortal) *CompliancePortal {
|
||||
ID: cp.ID,
|
||||
Active: cp.Active,
|
||||
Slug: cp.Slug,
|
||||
Title: cp.Title,
|
||||
EntityName: cp.EntityName,
|
||||
Description: cp.Description,
|
||||
WebsiteURL: cp.WebsiteURL,
|
||||
Email: cp.Email,
|
||||
|
||||
Reference in New Issue
Block a user