나는 ../myCustomTheme/layout/local.xml에 저장 다음 코드로 젠토의 top.links에 사용자 지정 링크를 추가 할 수 있어요다른 도메인으로 리디렉션되는 Magento top.links에 링크를 어떻게 추가합니까?
<reference name="root">
<reference name="top.links">
<action method="addLink" translate="label title">
<label>example</label>
<url>example</url>
<title>example</title>
<prepare>true</prepare>
<urlParams helper="core/url/getHomeUrl"/>
<position>100</position>
<liParams/>
<aParams>class="top-link-example"</aParams>
<beforeText></beforeText>
<afterText></afterText>
</action>
</reference>
</reference>
예 명명 된 링크를 생성합니다 위의 코드 포인트 http://myexampledomain.com/example. 내가
<url>http://myotherexampledomain.com</url>
에 코드
<url>example</url>
이 라인을 변경하면 나는 http://myexampledomain.com/http:/myotherexampledomain.com를 가리키는 링크라는 이름의 예와 끝까지. 준비 매개 변수를 false로 설정하고 ../app/code/core/Mage/Core/Model/Url.php를 보면서 urlParams에 다양한 매개 변수를 추가하려했습니다.
내 문제가 해결되었습니다. addLink 메소드에 필요한 모든 인수를 제공해야한다는 점은 주목할 가치가 있습니다. 그 이유는 addLink 메소드가 목록에서 누락 된 경우 그 이후의 모든 인수는 XML에서 무시 될 것이기 때문입니다. – nyaray