내 모듈에서 위시리스트 사이드바 파일을 재정의하는 방법은 무엇입니까?

magento.stackexchange https://magento.stackexchange.com//questions/62851

문제

내 모듈에서 위시리스트 모듈의 sidebar.phtml 파일을 재정의하고 싶습니다.

안내해주세요.

감사해요,

도움이 되었습니까?

해결책

내 생각에는 당신이 변화를 원하는 것 같아요 sidebar.phtml.

사용자 정의 모듈에서 새 레이아웃 파일을 만듭니다.

이 경우에는 프런트엔드 레이아웃 파일을 생성해야 합니다. customwishlist.xml 이 사용자 정의 모듈에서 이와 같이.

<?xml version="1.0" ?>
<config>
    <modules>
        <Amit_Custommodule>
            <version>1.0.0</version>
        </Amit_Custommodule>
    </modules>
    <!-- start of routers 
    -->
    <frontend>
        <layout>
            <updates>
                <custommodule>
                    <file>customwishlist.xml</file>
                </custommodule>
            </updates>
        </layout>
    </frontend>
</config>

새 레이아웃 파일에서 템플릿 파일 변경

그럼 에 customwishlist.xml 사용하는 파일 siderbar.phtml 이름과 사용 setTemplate 기능 세트 템플릿 .

<?xml version="1.0"?>
<layout version="0.1.0">
<!--
Default layout, loads most of the pages
-->
    <default> <!--  wishlist_sidebar sidebar block name define at wishlist.xml -->
        <reference name="wishlist_sidebar">
              <action method="setTemplate"><template>youpath/customsider.phtml</template></action>
        </reference>
    </default></layout>

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top