hof 22.4.0-title-update-beta → 22.4.0-title-update-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,7 @@
1
1
  ## 2025-04-15, Version 22.4.0 (Stable), @Rhodine-orleans-lindsay
2
2
  ### Changed
3
3
  - Amends page title format to follow the govuk design system so that the service name is now included in the the title by setting the `header` or `serviceName` in journey.json.
4
+ - Where page titles need to be different from page headings, if `title` is set pages.json, it can be used in the page title instead of `header`.
4
5
  ### Security
5
6
  - Updates patch and minor dependencies
6
7
 
@@ -173,6 +173,7 @@ module.exports = class Controller extends BaseController {
173
173
  fieldName = Object.keys(fields)[0];
174
174
  }
175
175
  return lookup([
176
+ `pages.${route}.title`,
176
177
  `pages.${route}.header`,
177
178
  `fields.${fieldName}.label`,
178
179
  `fields.${fieldName}.legend`
@@ -3,7 +3,7 @@
3
3
  {{> partials-head}}
4
4
  {{/head}}
5
5
  {{$pageTitle}}
6
- {{#errorlist.length}}{{#t}}errorlist.prefix{{/t}}{{/errorlist.length}}{{$header}}{{/header}}{{#serviceName}} – {{serviceName}}{{/serviceName}} – GOV.UK
6
+ {{#errorlist.length}}{{#t}}errorlist.prefix{{/t}}{{/errorlist.length}}{{#title}}{{title}}{{/title}}{{^title}}{{$header}}{{/header}}{{/title}}{{#serviceName}} – {{serviceName}}{{/serviceName}} – GOV.UK
7
7
  {{/pageTitle}}
8
8
  {{$bodyStart}}
9
9
  <a href="#{{#skipToMain}}{{skipToMain}}{{/skipToMain}}{{^skipToMain}}main-content{{/skipToMain}}" class="govuk-skip-link" id="skip-to-main">Skip to main content</a>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hof",
3
3
  "description": "A bootstrap for HOF projects",
4
- "version": "22.4.0-title-update-beta",
4
+ "version": "22.4.0-title-update-beta.2",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",
@@ -106,7 +106,6 @@
106
106
  },
107
107
  "journey": {
108
108
  "header": "HOF Bootstrap Sandbox Form",
109
- "serviceName": "tebfbvhf",
110
109
  "confirmation": {
111
110
  "details": "Your reference number <br><strong>HDJ2123F</strong>"
112
111
  }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "header": "HOF Bootstrap Sandbox Form",
3
- "serviceName": "tebfbvhf",
4
3
  "confirmation": {
5
4
  "details": "Your reference number <br><strong>HDJ2123F</strong>"
6
5
  }