我正在与Magento建立一个网上商店。我下载了一个名为HelloWired的免费主题。我在网上商店使用英语和荷兰语。有一个语言切换器,允许客户在这些语言之间切换。
我的问题是此开关出现两次。我检查了布局文件page.xml
,我注意到它在那里被提到了两次。但是,如果我删除其中一个,它要么什么都不做,要么删除它们。
谁可以帮我删除其中一个语言切换?
这是page.xml
文件中的代码:
<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>lib/ccard.js</script></action>
<action method="addJs"><script>prototype/prototype.js</script></action>
<action method="addJs" ifconfig="dev/js/deprecation"><script>prototype/deprecation.js</script></action>
<action method="addJs"><script>prototype/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="addItem"><type>skin_js</type><name>js/jquery-1.7.1.min.js</name></action>
<action method="addItem"><type>skin_js</type><name>js/imgpreview.js</name></action>
<action method="addItem"><type>skin_js</type><name>js/hello.jquery.js</name></action>
<action method="addItem"><type>skin_js</type><name>js/less.min.js</name></action>
<action method="addItem"><type>skin_js</type><name>js/respond.min.js</name><params/><if>IE</if></action>
<action method="addItem"><type>skin_js</type><name>js/cufon-yui.js</name></action>
<action method="addItem"><type>skin_js</type><name>js/jquery.cycle.all.js</name></action>
<action method="addItem"><type>skin_js</type><name>js/custom.js</name></action>
<action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
<action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
<action method="addCss"><stylesheet>css/responsive.css</stylesheet></action>
<action method="addCss"><stylesheet>css/custom.css</stylesheet></action>
<action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
<action method="addItem"><type>skin_js</type><name>js/pngfix.js</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>skin_js</type><name>js/ie6.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="core/text_list" name="after_body_start" as="after_body_start"/>
<block type="page/html_notices" name="global_notices" as="global_notices" template="page/html/notices.phtml" />
<block type="page/html_header" name="header" as="header">
<block type="core/text_list" name="top.menu" as="topMenu"/>
<block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
<block type="page/template_links" name="top.links" as="topLinks"/>
<block type="page/html_wrapper" name="top.bar" as="topBar" translate="label">
<action method="setElementClass"><value>top-bar</value></action>
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</block>
<block type="catalog/navigation" name="mobile-nav" as="mobile-nav" template="catalog/navigation/mobile-nav.phtml" />
<block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
<label>Page Header</label>
<action method="setElementClass"><value>top-container</value></action>
</block>
<block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
</block>
<block type="core/text_list" name="left" as="left" translate="label">
<label>Left Column</label>
</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" translate="label">
<label>Main Content Area</label>
</block>
<block type="core/text_list" name="right" as="right" translate="label">
<label>Right Column</label>
</block>
<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
<block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label">
<label>Page Footer</label>
<action method="setElementClass"><value>bottom-container</value></action>
</block>
<block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
<block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>
</block>
<block type="core/text_list" name="before_body_end" as="before_body_end"/>
</block>
<block type="core/profiler" output="toHtml" name="core_profiler"/>
</default>
<print translate="label" module="page">
<label>All Pages (Print Version)</label>
<!-- Mage_Page -->
<block type="page/html" name="root" output="toHtml" template="page/print.phtml">
<block type="page/html_head" name="head" as="head">
<action method="addJs"><script>lib/ccard.js</script></action>
<action method="addJs"><script>prototype/prototype.js</script></action>
<action method="addJs"><script>mage/translate.js</script></action>
<action method="addJs"><script>prototype/validation.js</script></action>
<action method="addJs"><script>varien/js.js</script></action>
<action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
<action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
<action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
<action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
<action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
<action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>
</block>
<block type="core/text_list" name="content" as="content" translate="label">
<label>Main Content Area</label>
</block>
</block>
</print>
答案 0 :(得分:1)
尝试找到构建页面的主题的.phtml文件。例如,如果lang切换器位于标题处,则需要找到header.phtml。在这个文件里面可能是这段代码$this->getChildHtml('store_language')
或其他一些与商店语言相关的代码,两次。