고객의 "내 계정"페이지에서 제대로 작동하도록 customer.xml 레이아웃 파일을 가져 오는 데 문제가 있습니다.Magento 내 계정 레이아웃 XML 문제
일반적으로 페이지의 왼쪽에있는 탐색 링크와 이전에 주문한 항목은 페이지에 표시되지 않지만 xml 파일에서 참조 이름을 "content"로 변경하면 (그것은 분명히 그 다음 오른쪽에있다). 내가 참조하는 템플릿 (2columns-left.phtml)을 확인한 후 getChildHtml ('left')이 올바른 위치에 있습니다. 문제를 일으키는
블록 : 이것은 기본적으로이 100 % 작동 우리 사이트의 또 다른 하나에서 바로 복사 된
<customer_account>
<!-- Mage_Customer -->
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
<reference name="left">
<action method="unsetChild"><name>catalog.navigation.all</name></action>
<action method="unsetChild"><name>callout.sendcard</name></action>
<action method="unsetChild"><name>callout.specialorder</name></action>
<block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml">
<action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action>
<action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action>
<action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action>
</block>
<block type="sales/reorder_sidebar" name="sale.reorder.sidebar" as="reorder" template="sales/reorder/sidebar.phtml"/>
<remove name="tags_popular"/>
</reference>
</customer_account>
. 나는 내가 생각할 수있는 모든 것을 시도했다. (예를 들어 템플릿과 레이아웃 xml 모두에서 참조 이름을 바꾼다.) 아무 소용이 없다. 레이아웃이 참조하는 템플릿은 "컨텐츠"영역에 배치 될 때 나타나기 때문에 명백하게 작동합니다.
이 magento 설치는 버전 1.3.1.1입니다. 나는 "global_messages"에 대한 참조를 변경했는데, 그 중 하나가 표시되지 않습니다
난 당신이 내게 줄 필요가 조언 ...
업데이트를 주셔서 감사합니다. "콘텐츠"섹션에서만 작동하는 것 같습니다.
업데이트 2 : 다음은 앨런 스톰의 매우 편리한 디버깅 모듈을 사용하는 경우 페이지에서 "showLayout = 페이지"쿼리 문자열을 사용하는 결과 (아래 그의 대답에서 찾을 수있는)입니다.
<?xml version="1.0"?>
<layout><block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">
<block type="page/html_head" name="head" as="head">
<action method="addJs">
<script>prototype/prototype.js</script>
</action>
<action method="addJs">
<script>prototype/validation.js</script>
</action>
<action method="addJs">
<script>paypoint/validation.js</script>
</action>
<action method="addJs">
<script>scriptaculous/builder.js</script>
</action>
<action method="addJs">
<script>scriptaculous/effects.js</script>
</action>
<action method="addJs">
<script>scriptaculous/dragdrop.js</script>
</action>
<action method="addJs">
<script>scriptaculous/controls.js</script>
</action>
<action method="addJs">
<script>scriptaculous/slider.js</script>
</action>
<action method="addJs">
<script>varien/js.js</script>
</action>
<action method="addJs">
<script>varien/form.js</script>
</action>
<action method="addJs">
<script>varien/menu.js</script>
</action>
<action method="addJs">
<script>mage/translate.js</script>
</action>
<action method="addJs">
<script>mage/cookies.js</script>
</action>
<action method="addCss">
<stylesheet>css/reset.css</stylesheet>
</action>
<action method="addCss">
<stylesheet>css/boxes.css</stylesheet>
</action>
<action method="addCss">
<stylesheet>css/clears.css</stylesheet>
</action>
<action method="addCss">
<stylesheet>css/menu.css</stylesheet>
</action>
<action method="addCss">
<stylesheet>css/calendar-blue.css</stylesheet>
</action>
<action method="addCss">
<stylesheet>css/styles.css</stylesheet>
</action>
<action method="addItem">
<type>skin_css</type>
<name>css/iestyles.css</name>
<params/>
<if>IE</if>
</action>
<action method="addItem">
<type>skin_css</type>
<name>css/ie7.css</name>
<params/>
<if>IE 7</if>
</action>
<action method="addItem">
<type>skin_css</type>
<name>css/ie7minus.css</name>
<params/>
<if>lt IE 7</if>
</action>
<action method="addItem">
<type>js</type>
<name>lib/ds-sleight.js</name>
<params/>
<if>lt IE 7</if>
</action>
<action method="addItem">
<type>js</type>
<name>varien/iehover-fix.js</name>
<params/>
<if>lt IE 7</if>
</action>
<action method="addCss">
<stylesheet>css/print.css</stylesheet>
<params>media="print"</params>
</action>
</block>
<block type="page/html_header" name="header" as="header">
<block type="page/template_links" name="top.links" as="topLinks"/>
<block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
<block type="core/template" name="top.nav" template="page/html/top.nav.phtml"/>
</block>
<block type="core/messages" name="global_messages" as="global_messages"/>
<block type="core/messages" name="messages" as="messages"/>
<block type="core/text_list" name="content" as="content"/>
<block type="core/text_list" name="right" as="right"/>
<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml"/>
<block type="core/text_list" name="before_body_end" as="before_body_end"/>
</block>
<block type="core/profiler" output="toHtml"/>
<reference name="top.links">
<action method="addLink" translate="label title" module="customer">
<label>My Account</label>
<url helper="customer/getAccountUrl"/>
<title>My Account</title>
<prepare/>
<urlParams/>
<position>10</position>
</action>
</reference>
<reference name="root">
<action method="setTemplate">
<template>page/2columns-left.phtml</template>
</action>
</reference>
<reference name="top.menu">
<block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top.phtml"/>
</reference>
<reference name="footer_links">
<action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map">
<label>Site Map</label>
<url helper="catalog/map/getCategoryUrl"/>
<title>Site Map</title>
</action>
</reference>
<reference name="footer_links">
<action method="addLink" translate="label title" module="catalogsearch" ifconfig="catalog/seo/search_terms">
<label>Search Terms</label>
<url helper="catalogsearch/getSearchTermUrl"/>
<title>Search Terms</title>
</action>
<action method="addLink" translate="label title" module="catalogsearch">
<label>Advanced Search</label>
<url helper="catalogsearch/getAdvancedSearchUrl"/>
<title>Advanced Search</title>
</action>
</reference>
<reference name="top.links">
<block type="checkout/links" name="checkout_cart_link">
<action method="addCartLink"/>
<action method="addCheckoutLink"/>
</block>
</reference>
<reference name="footer">
<block type="cms/block" name="cms_footer_links" before="footer_links">
<action method="setBlockId">
<block_id>footer_links</block_id>
</action>
</block>
</reference>
<reference name="left">
<block type="tag/popular" name="tags_popular" template="tag/popular.phtm" ignore="1">
<action method="setTemplate">
<template>tag/popular.phtml</template>
</action>
</block>
</reference>
<reference name="left">
</reference>
<reference name="before_body_end">
<block type="googleanalytics/ga" name="google_analytics" as="google_analytics"/>
</reference>
<reference name="footer_links">
<action method="addLink" translate="label title" module="contacts" ifconfig="contacts/contacts/enabled">
<label>Contact Us</label>
<url>contact-us</url>
<title>Contact Us</title>
<prepare>true</prepare>
</action>
</reference>
<reference name="footer_links">
<action method="addLink" translate="label title" module="rss" ifconfig="rss/config/active">
<label>RSS</label>
<url>rss</url>
<title>RSS testing</title>
<prepare>true</prepare>
<urlParams/>
<position/>
<li/>
<a>class="link-feed"</a>
</action>
</reference>
<reference name="wishlist_sidebar">
<action method="addPriceBlockType">
<type>bundle</type>
<block>bundle/catalog_product_price</block>
<template>bundle/catalog/product/price.phtml</template>
</action>
</reference>
<reference name="cart_sidebar">
<action method="addItemRender">
<type>bundle</type>
<block>bundle/checkout_cart_item_renderer</block>
<template>checkout/cart/sidebar/default.phtml</template>
</action>
</reference>
<reference name="root">
<action method="setTemplate">
<template>page/2columns-left.phtml</template>
</action>
</reference>
<reference name="left">
<action method="unsetChild">
<name>catalog.navigation.all</name>
</action>
<action method="unsetChild">
<name>callout.sendcard</name>
</action>
<action method="unsetChild">
<name>callout.specialorder</name>
</action>
<block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml">
<action method="addLink" translate="label" module="customer">
<name>account</name>
<path>customer/account/</path>
<label>Account Dashboard</label>
</action>
<action method="addLink" translate="label" module="customer">
<name>account_edit</name>
<path>customer/account/edit/</path>
<label>Account Information</label>
</action>
<action method="addLink" translate="label" module="customer">
<name>address_book</name>
<path>customer/address/</path>
<label>Address Book</label>
</action>
</block>
<block type="sales/reorder_sidebar" name="sale.reorder.sidebar" as="reorder" template="sales/reorder/sidebar.phtml"/>
<remove name="tags_popular"/>
</reference>
<reference name="customer_account_navigation">
<action method="addLink" translate="label" module="sales">
<name>orders</name>
<path>sales/order/history/</path>
<label>My Orders</label>
</action>
</reference>
<reference name="customer_account_navigation">
<action method="addLink" translate="label" module="tag">
<name>tags</name>
<path>tag/customer/</path>
<label>My Tags</label>
</action>
</reference>
<reference name="customer_account_navigation">
<action method="addLink" translate="label" module="newsletter">
<name>newsletter</name>
<path>newsletter/manage/</path>
<label>Newsletter Subscriptions</label>
</action>
</reference>
<reference name="cart_sidebar">
<action method="addItemRender">
<type>bundle</type>
<block>bundle/checkout_cart_item_renderer</block>
<template>checkout/cart/sidebar/default.phtml</template>
</action>
</reference>
<update handle="customer_account"/>
<reference name="content">
<block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml">
<block type="customer/account_dashboard_hello" name="customer_account_dashboard_hello" as="hello" template="customer/account/dashboard/hello.phtml"/>
<block type="core/template" name="customer_account_dashboard_top" as="top"/>
<block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/>
<block type="customer/account_dashboard_newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="customer/account/dashboard/newsletter.phtml"/>
<block type="customer/account_dashboard_address" name="customer_account_dashboard_address" as="address" template="customer/account/dashboard/address.phtml"/>
<block type="core/template" name="customer_account_dashboard_info1" as="info1"/>
<block type="core/template" name="customer_account_dashboard_info2" as="info2"/>
</block>
</reference>
<reference name="right">
<action method="unsetChild">
<name>catalog_compare_sidebar</name>
</action>
</reference>
<reference name="customer_account_dashboard">
<action method="unsetChild">
<name>top</name>
</action>
<block type="sales/order_recent" name="customer_account_dashboard_top" as="top" template="sales/order/recent.phtml"/>
</reference>
<reference name="right">
<action method="unsetChild">
<name>right.poll</name>
</action>
</reference>
<reference name="customer_account_dashboard">
<action method="unsetChild">
<name>customer_account_dashboard_info2</name>
</action>
<block type="tag/customer_recent" name="customer_account_dashboard_info2" as="info2" template="tag/customer/recent.phtml"/>
</reference>
<reference name="right">
<action method="unsetChild">
<name>right.newsletter</name>
</action>
</reference>
<reference name="top.links">
<action method="addLink" translate="label title" module="customer">
<label>Log Out</label>
<url helper="customer/getLogoutUrl"/>
<title>Log Out</title>
<prepare/>
<urlParams/>
<position>100</position>
</action>
</reference></layout>
이상한. 나는 당신이 실수로 page.xml에서 "left"블록을 제거하지 않았거나 어딘가에 기본 섹션에서 설정을 해제하지 않았습니까? –
레미, 알아 냈어? 오늘 아침에 귀하의 의견을 보았습니다. 그러나 제가 회신하기 위해 돌아 왔을 때 그것은 사라졌습니다. –