We want to override Title.php of \vendor\magento\framework\View\Page We tried different ways but none of them are working. If anyone already did this before then please help us to do this.

Below is what we want to achieve. Want to add static meta title to the entire website. If any other better way to do this then it will be appreciated.

Thank you


add this to di.xml of your module

<preference for="Magento\Framework\View\Page\Title" type="[Vendor]\[Module]\View\Page\Title" />

Then create the class [Vendor]\[Module]\View\Page\Title that extends Magento\Framework\View\Page\Title and make your changes in there

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.