2014-05-16 3 views
2

안녕하세요, phtml 파일에 세 개의 링크를 구현하려고합니다. 이 장소에는 블럭이 없기 때문에이 링크를 설정할 수 있습니다. 그래서 XML 파일을 사용할 수 없습니다. 이러한 링크는 다음과 같습니다.Magento 고객 계정 링크가 phtml 파일

/customer/account/edit/ 

/customer/address/ 

/sales/order/history/ 

href에서 하드 링크를 설정하지 않고이 페이지의 URL을 가져 오는 방법이 있습니까?

다니엘

답변

3

을 시도 사전에

Thank's;

<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> 
1

이 많은 성능 차이가 아니라, 대안은 아래에서 확인할 수 있습니다

<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>