25

You can set title using below code: <referenceBlock name="page.main.title"> <action method="setPageTitle"> <argument translate="true" name="title" xsi:type="string">My Dashboard</argument> </action> </referenceBlock> If you want to change customer login create a file name with customer_account_login.xml ...


23

have you tried in cms_index_index.xml something like this? <?xml version="1.0"?> <!-- /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/...


13

You can do it in different ways - it's enough to use only one: 1. From controller /** @var \Magento\Framework\View\Result\Page $resultPage */ $resultPage = $this->resultPageFactory->create(); $resultPage->getConfig()->getTitle()->set('Something'); 2. From layout module_controller_action.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/...


11

There are several methods available to do that. But i will prefer second one. 1 Core block override 2 Event/Observer So, once you have created your module, you will need to declare the observer in your config.xml: <!-- config xml --> <frontend> <events> <controller_action_layout_render_before_review_product_list>...


7

Magento 2.2 For Magento 2.2 this is now in Content -> Design -> Configuration Then click edit on either website, store or view. Finally, go to the html head section and fill out Prefix or Suffix. Magento 2.1 In 2.1, this is now handled by UI component and it's located under Content > Configuration > > Other Settings and then HTML Head section and here ...


6

Unfortunately you cannot do that via xml layouts only. But you have a few other options. All of them require some coding. Option 1 - Quick and dirty Edit app/design/frontned/{package}/{theme}/catalog/product/category/view.phtml and add an if statement around the h1 tag. Something like this: if ($_category->getId() != 44) { //your category id here ...


6

You can change the default page title in the admin panel: System -> Configuration -> GENERAL -> Design -> HTML Head -> Default Title


6

This is not really possible. It is just possible in very few template files. The problem is, that Magento renders the template files hierarchically. Naturally, the head block where the title and the description are rendered, is rendered in the beginning of that process. You could update the information in general template files like 2columns-right.phtml if ...


5

Go to System > Configuration > Design > Html Head their you can see "Title Suffix" you can give your title - Example.com here which will add in all the page at last For More Information check http://magento-online-tutorials.blogspot.in/2015/11/adding-suffix-or-prefix-to-title-tag-in.html


5

I make it work. Bellow is the solution: <reference name="head"> <action method="setTitle" translate="title" module="sendfriend"><title>Email to a Friend</title></action> </reference> and i edited sendfriend.xml file, and paste the above code thanks


5

In this case, we can use layout_generate_blocks_before On this fire an observer which change title and set Current customer name in place of My Dashboard Observer: <?php namespace Devamitbera\ChangePagetitle\Observer; use Magento\Framework\Event\ObserverInterface; use Magento\Framework\App\Request\DataPersistorInterface; use Magento\Framework\App\...


5

You can also use this below code. customer_account_index.xml <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <update handle="customer_account"/> <body> <referenceBlock name="page.main.title" template="...


5

Solved it. The problem was that I had a layout using Magento\Customer\Block\Form\Login, like this: <block class="Magento\Customer\Block\Form\Login" name="login.sidebar" template="form/login_sidebar.phtml"> <container name="form.additional.info" as="form_additional_info"/> </block> I saw that Magento\Customer\Block\Form\Login class was ...


4

You forgot a semicolon. <?php if(Mage::registry('current_product')) ?> should be <?php if(Mage::registry('current_product')) : ?> When developing, turn the error reporting on and the developer mode. This way you get a clear message of what's wrong with your code.


3

You can't do this with a simple layout update xml. The easiest way to achieve this is create a new root template specific to your cms page. Steps for this is given below. 1. Layout Update XML File Go to CMS > Pages > [Select your CMS Page] > Design > Layout Update XML section. Put this layout update code there. <!-- removing default page ...


3

Edit the template file app/design/frontend/{package}/{theme}/template/catalog/category/view.phtml and replace the line: <h1><?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?></h1> with <h1><?php echo $_helper->categoryAttribute($_category, $_category->getInternalTitle(), '...


3

Login to Admin Goto Content->Element: pages-> Edit HomePage Select Content Remove Contet Heading and Save.


3

For all other Pages create cms_page_view.xml instead cms_index_index.xml /app/design/frontend/<vendor>/<theme>/Magento_Cms/layout/cms_page_view.xml And add same code you have used for cms_index_index.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...


3

Try prepend(__("My Title")); public function execute() { $resultPage = $this->resultPageFactory->create(); $resultPage->getConfig()->getTitle()->prepend(__("My Title")); return $resultPage; }


3

You can add your code here: /app/code/Custom/module/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <preference for="Magento\Theme\Block\Html\Title" type="Custom\Module\Block\Html\Title" /> </config> ...


2

There might be a better way to do this but this should get you there: Magento\app\design\adminhtml\default\default\layout\main.xml Line 57 <action method="setTitle" translate="title"><title>Magento Admin</title></action>


2

Option 4 - You can add this under the "custom design" tab in a category. Just copy the original view.phtml. Edit the title section to either remove it or comment out. The path to this file is: /your_theme/template/catalog/category/ <reference name="category.products"> <action method="setTemplate"> <template>catalog/category/...


2

The quick and dirty way to do it. To cut prefix: <?php $prefix = Mage::getStoreConfig('design/head/title_prefix'); $title = $this->getLayout()->getBlock('head')->getTitle(); $processedTitle = trim(substr($title, strlen($prefix))); ?> <h1><?php echo $processedTitle;?></h1> To cut suffix: <?php $suffix = Mage::...


2

If you want to have it as "real magento" Product Title then you should join it during import. If it is a pure display issue, then it will be enough to adapt the templates that display product names (e.g. display/frontend/package/default/template/catalog/prodcut/view.phtml) or for the other places (categories, sidebars, carts) alike. There you mostly find ...


2

You can create your custom module and hook the event catalog_controller_product_view <frontend> <events> <catalog_controller_product_view> <observers> <yourmodule> <type>singleton</type> <class>yourmodule/...


2

Here is the solution for you: if ($currentNode = Mage::registry('current_cms_hierarchy_node')) { // Zend_Debug::dump($currentNode->getData()); $parentId = $currentNode->getParentNodeId(); $parentNode = Mage::getModel('enterprise_cms/hierarchy_node') ->load($parentId); // Zend_Debug::dump($parentNode->getData()); ...


2

Make sure in your head.phtml file you have do not have fixed title and it has dynamic value. <title><?php echo $this->getTitle() ?></title> Check file app/design/frontend/{your_package}/{your_theme}/template/page/html/head.phtml


2

you can add a new category attribute called page_title. Here is a tutorial on how to do it. Then edit the template app/design/frontend/{package}/{theme}/template/catalog/category/view.phtml and replace <h1><?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?></h1> with <h1> <?php if ($...


2

Put this function in Block page of that Module public function _prepareLayout() { $this->pageConfig->getTitle()->set(__('Your Page Title')); return parent::_prepareLayout(); }


2

I figured it out. I had to change out the page title in the html template from <title><?php echo $this->getTitle() ?></title> to <title><?php echo ($this->getForcedTitle()) ? $this->getForcedTitle() : $this->getTitle() ?></title>


Only top voted, non community-wiki answers of a minimum length are eligible