Hi I'm trying to replace a link to a cms page "review" in a .phtml file like so:

<?php echo $this->getUrl('review'); ?>

But this returns www.mydomain/shop/review/ as "shop" is our store view code.

How can I change it to return www.mydomain/review/ ?

有帮助吗?

解决方案

Try this

<?php echo $this->getUrl('review', array('_type'=>Mage_Core_Model_Store::URL_TYPE_DIRECT_LINK)); ?>
许可以下: CC-BY-SA归因
scroll top