I need to have output in a way that all the other pages should get the default title but for product detail page I need a specific title.For this so far I tried adding this code

<h3><?php echo $this->getLayout()->getBlock('head')->getTitle();?></h3>-->>This is for common title
<?php if(Mage::registry('current_product')) ?>
<h3><?php echo "Feaured Products";?></h3>-->>this if for product detail page title.
<?php endif; ?>

but doing in this way crashing my page.


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.

  • Thank you for the answer and also for your suggestion @marius – Abdul Dec 19 '14 at 8:39

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.