我試圖沒有成功下面使用的代碼:unsetChild方法沒有在Magento工作1佈局
<reference name="right">
<action method="unsetChild">
<name>product.info.sharing</name>
</action>
</reference>
圖1:爲兒童塊
圖片2:父塊
我試圖沒有成功下面使用的代碼:unsetChild方法沒有在Magento工作1佈局
<reference name="right">
<action method="unsetChild">
<name>product.info.sharing</name>
</action>
</reference>
圖1:爲兒童塊
圖片2:父塊
「product.info.options.wrapper.bottom」 - 它是「product.info」的子塊&「product.info.sharing」意思是sharing.phtml文件附加在「product.info.options.wrapper .bottom「這樣..我已經把這個名字引用,我的解決方案...謝謝。
打開模板路徑提示並查看它來自哪個模板文件。
然後您可以在主題的catalog.xml中搜索並查看as
中使用的名稱。檢查父塊,在參考標記中使用他的名稱,在標記中使用原始塊的標記as
中的值。
在佈局文件夾添加local.xml
,試試這個與你的價值觀
<catalog_product_view>
<reference name="product.info">
<action method="unsetChild"><name>sharing</name></action>
</reference>
</catalog_product_view>
清除緩存。
不適合我... !! –
您可以共用路徑那個local.xml和代碼 – Shrikant
<?XML版本= 「1.0」 編碼= 「UTF-8」?> <佈局版本= 「0.1.0」>
這是我的代碼: <引用名= 「右」> product.info.sharing 但沒有奏效... –
你能告訴你什麼正試圖實現? – damienc
移除magento產品頁面中的社交共享按鈕1 –