I have title suffix in magento 1.7 system configuration.

I would like to remove title suffix from all cms pages or from cms pages besides home page.

How to do this?

1 Answer 1


IN file:



<title><?php echo $this->getTitle() ?></title>

In place of it put below code and test:

<?php if($this->getRequest()->getModuleName() =='cms' && Mage::getSingleton('cms/page')->getIdentifier()!='home') { ?>
      $prefix = Mage::getStoreConfig('design/head/title_suffix');
      $title = $this->getTitle();
      $processedTitle = trim(substr($title, 0, strpos($title, $prefix)));
      <title><?php echo $processedTitle; ?></title>
 <?php } else {?>
      <title><?php echo $this->getTitle() ?></title>
 <?php }?>
  • Thanx! Great work!
    – samdecks
    Aug 8, 2016 at 9:38
  • @samdecks if it works for you, you can accept the answer by clicking on above button. Aug 8, 2016 at 9:39
  • @samdecks if above code works for you, you can accept the answer. Aug 9, 2016 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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