Skip to content

Commit 122e5c2

Browse files
#13982: Customer Login Block sets the title for the page when rendered. Move setPageTitle from Block to layout configs
1 parent eb0653c commit 122e5c2

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

app/code/Magento/Customer/Block/Form/Login.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,6 @@ public function __construct(
4747
$this->_customerSession = $customerSession;
4848
}
4949

50-
/**
51-
* @return $this
52-
*/
53-
protected function _prepareLayout()
54-
{
55-
$this->pageConfig->getTitle()->set(__('Customer Login'));
56-
return parent::_prepareLayout();
57-
}
58-
5950
/**
6051
* Retrieve form posting url
6152
*

app/code/Magento/Customer/view/frontend/layout/customer_account_login.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
-->
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
99
<body>
10+
<referenceBlock name="page.main.title">
11+
<action method="setPageTitle">
12+
<argument name="title" translate="true" xsi:type="string">Customer Login</argument>
13+
</action>
14+
</referenceBlock>
1015
<referenceContainer name="content">
1116
<!-- customer.form.login.extra -->
1217
<container name="customer.login.container" label="Customer Login Container" htmlTag="div" htmlClass="login-container">

0 commit comments

Comments
 (0)