I am trying to set my own custom canonical links in Magento for products through the use of a custom attribute but I cannot get the attribute to echo in the head.phtml file. This is what I have so far. Please can anybody help?
<?php if (Mage::registry('current_product')) : ?>
<?php $customcanonical = Mage::registry(‘current_product’)->getData(‘canonical_link’); ?>
<link rel="canonical" content="<?php echo $customcanonical ?>" />
<?php endif; ?>
where canonical_link is my custom attribute