你好,我试图在一个html文件中实现三个链接。在这个地方,我没有块,我可以设置这些链接,这就是为什么我不能使用xml文件。这些链接是:
/customer/account/edit/
/customer/address/
/sales/order/history/
是否有一种方法来获得这些页面的url,而无需在href中设置它们?
提前感谢
丹尼尔性能差异不大,但可以在下面找到另一种选择;
<a href="<?php echo Mage::getUrl('customer/account/edit'); ?>" title="<?php echo $this->__('Edit'); ?>"><?php echo $this->__('Edit'); ?></a>
<a href="<?php echo Mage::getUrl('customer/address'); ?>" title="<?php echo $this->__('Address'); ?>"><?php echo $this->__('Address'); ?></a>
<a href="<?php echo Mage::getUrl('sales/order/history'); ?>" title="<?php echo $this->__('History'); ?>"><?php echo $this->__('History'); ?></a>
Try
<a href="<?php echo Mage::getBaseUrl() ?>customer/account/edit">Edit</a>
<a href="<?php echo Mage::getBaseUrl() ?>customer/address">Address</a>
<a href="<?php echo Mage::getBaseUrl() ?>sales/order/history">History</a>