Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Relabelled Landing Page to Standard Page #159

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/install/node.type.landing_page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ third_party_settings:
parent: 'main:'
wysiwyg_template:
default_template: ''
name: 'Landing Page'
name: 'Standard Page'
type: landing_page
description: 'Use <em>Landing Page</em> content type for custom landing pages.'
description: 'Use <em>Standard Page</em> content type for custom standard pages.'
help: ''
new_revision: true
preview_mode: 1
Expand Down
10 changes: 10 additions & 0 deletions tests/behat/features/fields.feature
Original file line number Diff line number Diff line change
Expand Up @@ -305,3 +305,13 @@ Feature: Fields for Landing Page content type
# This field can be "seen" but not visible.
And I see field "field_landing_page_component[0][subform][field_customise][value]"
And save screenshot

@api @nosuggest
Scenario: Ensure that Landing Page is relabelled to Standard Page and Appropriate description has been added.
Given I am logged in as a user with the "editor" role
When I visit "node/add"
Then I see the text 'Standard Page'
And I see the text 'Use Standard Page content type for custom standard pages.'
When I visit "admin/content"
Then I select "Standard Page" from "edit-type"
And I press "Filter"
15 changes: 15 additions & 0 deletions tide_landing_page.install
Original file line number Diff line number Diff line change
Expand Up @@ -2350,3 +2350,18 @@ function tide_landing_page_update_8040() {
}
}
}

/**
* Relabel Landing Page to Standard Page.
*/
function tide_landing_page_update_8041() {
$configEntity = \Drupal::entityTypeManager()
->getStorage('node_type')
->load('landing_page');
if (!$configEntity) {
return NULL;
}
$configEntity->set('name', 'Standard Page');
$configEntity->set('description', 'Use <em>Standard Page</em> content type for custom standard pages.');
$configEntity->save();
}