Skip to content

Instantly share code, notes, and snippets.

@vasilii-b
Created March 20, 2019 12:15
Show Gist options
  • Save vasilii-b/f64518f4a0dbca2c4baf0a2e82ca4e31 to your computer and use it in GitHub Desktop.
Save vasilii-b/f64518f4a0dbca2c4baf0a2e82ca4e31 to your computer and use it in GitHub Desktop.
Set/Update page title via layout xml file
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="page.main.title">
<action method="setPageTitle">
<argument translate="true" name="title" xsi:type="string">New page title</argument>
</action>
</referenceBlock>
</body>
</page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment