I need help to change the page title, the page is order details, I need to leave the page title dynamic, for each order to have its own, instead of showing increment id, I will show another attribute
I can change the title, but it always stays the same, as I did it by xml
my XML:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" 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">Custom Title</argument>
</action>
</referenceBlock>
</body>
</page>
how do I change this via controller, or observer, to be dynamic?