As in magento default there is no option for cms pages to input meta title but you can do this by following the steps:

Step1: Open your database find the table cms_page open the table and add a column named with meta_title

Step2: Then in app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php find the function protected function _prepareForm()
and add this before $fieldset->addField(‘meta_keywords’)

$fieldset->addField('meta_title', 'text', array(
    'name' => 'meta_title',
    'label' => Mage::helper('cms')->__('Title'),
    'title' => Mage::helper('cms')->__('Meta Title'),
    'disabled'  => $isElementDisabled
));

Step3:To display it in title navigate the file:

app/code/core/Mage/Cms/Block/Page.php and find out the function protected function _prepareLayout()

Replace this:

$head->setTitle($page->getTitle());

With this:

$head->setTitle($page->getMetaTitle() ? $page->getMetaTitle() : $page->getTitle());


Categories: Magento

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *