geturl but ignore store code
-
11-10-2020 - |
Pregunta
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/ ?
Solución
Try this
<?php echo $this->getUrl('review', array('_type'=>Mage_Core_Model_Store::URL_TYPE_DIRECT_LINK)); ?>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange