1

we wanted to hide menu and footer for some pages[.phhtml]

this is code for the following page : http://pastebin.com/NghF3bC1

http://hotwheelstoys.in/one/em0113-full-package/index.php/marketplace/

what code we have to use to restrict menu and footer

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
        <reference name="top.links">
            <action method="addLink" translate="label title" module="marketplace">
                <label>Marketplace</label>
                <url>marketplace</url>
                <title>Marketplace</title>
                <prepare>true</prepare>
            </action>
        </reference>
    </default>

    <checkout_cart_index>
        <reference name="checkout.cart">
            <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>marketplace/checkout/cart/item/default.phtml</template></action>
            <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>marketplace/checkout/cart/item/default.phtml</template></action>
            <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>marketplace/checkout/cart/item/default.phtml</template></action>
        </reference>
    </checkout_cart_index>

    <marketplace_index_toplinkmarketplace>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
        </reference>
        <!--<Urvashi add this code>-->
            <reference name="header">
                <block type="page/header" name="header">
                    <action method="setTemplate"><template>page/html/seller.phtml</template></action> 
                </block> 
            </reference>
        <!--Urvashi Up to here >-->

        <reference name="root">
            <action method="setTemplate">
                <template>page/1column.phtml</template>
            </action>
        </reference>
        <reference name="content">
            <block type="marketplace/marketplace" name="marketplace" template="marketplace/marketplace.phtml" />
        </reference>
    </marketplace_index_toplinkmarketplace>
    <marketplace_account_becomepartner>
        <update handle="customer_account" />
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/wk_block.css</stylesheet>
            </action>
        </reference>
        <reference name="content">
            <block type="marketplace/becomepartner" name="marketplace_becomepartner" template="marketplace/becomepartner.phtml" />
        </reference>
    </marketplace_account_becomepartner>
    <catalog_product_view>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/wk_block.css</stylesheet>
            </action>
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
        </reference>
        <reference name="right">
            <block type="core/template" name="wk-block" template="marketplace/wk_block.phtml" before="-"></block>
        </reference>
    </catalog_product_view>
    <customer_account_create>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
        </reference>
        <reference name="content">
            <block type="core/template" name="customer_conf" template="marketplace/confpartner.phtml" />
        </reference>
    </customer_account_create>
    <customer_account>
         <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
        </reference>
        <reference name="left">
            <block type="core/template" name="marketplacenavigation" template="marketplace/navigation.phtml" before="-" />
        </reference>
    </customer_account>
    <marketplace_account_editaccount>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
            <action method="addCss">
                <stylesheet>marketplace/colorpicker/css/colorpicker.css</stylesheet>
            </action>
            <action method="addItem">
                <type>skin_js</type>
                <script>marketplace/js/nicEdit-latest.js</script>
            </action>
        </reference>
        <update handle="customer_account" />
        <reference name="content">
            <block type="core/template" name="edit_myprofile" template="marketplace/edit_myprofile.phtml" />
        </reference>
    </marketplace_account_editaccount>
    <marketplace_marketplaceaccount_newproduct>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
            <action method="addCss">
                <stylesheet>marketplace/colorpicker/css/colorpicker.css</stylesheet>
            </action>
            <action method="addItem">
                <type>skin_js</type>
                <script>marketplace/js/nicEdit-latest.js</script>
            </action>
        </reference>
        <update handle="customer_account" />
        <reference name="content">
            <block type="marketplace/newproduct" name="new_product" template="marketplace/newproduct.phtml" />
        </reference>
    </marketplace_marketplaceaccount_newproduct>

   <marketplace_account_configurableproduct>
        <update handle="customer_account"/>
        <reference name="head">
            <action method="addCss"><stylesheet>marketplace/css/style.css</stylesheet></action>     
            <action method="addItem"><type>skin_js</type><script>marketplace/js/nicEdit-latest.js</script></action>     
        </reference>
        <reference name="content">
            <block type="core/template" name="marketplace_addproduct" template="marketplace/newconfigurableproduct.phtml"/>
        </reference>
    </marketplace_account_configurableproduct>

    <marketplace_account_configurableassociate>
        <update handle="customer_account"/>
        <reference name="content">
            <block type="marketplace/associate" name="marketplace_account_configurableassociate" template="marketplace/configurableassociate.phtml"/>
        </reference>
    </marketplace_account_configurableassociate>

    <marketplace_account_configurableproductattr>
        <update handle="customer_account"/>
        <reference name="content">
            <block type="marketplace/products" name="marketplace_account_configurableproductattr" template="marketplace/configurableproductattr.phtml"/>
        </reference>
    </marketplace_account_configurableproductattr>
    <marketplace_account_newattribute>
        <update handle="customer_account"/>
        <reference name="head">
            <action method="addCss"><stylesheet>marketplace/css/style.css</stylesheet></action>             
        </reference>
        <reference name="content">
            <block type="marketplace/products" name="marketplace_account_newattribute" template="marketplace/newattribute.phtml"/>
        </reference>
    </marketplace_account_newattribute>
    <marketplace_account_simpleproduct>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
            <action method="addItem">
                <type>skin_js</type>
                <script>marketplace/js/nicEdit-latest.js</script>
            </action>
        </reference>
        <update handle="customer_account" />
        <reference name="content">
            <block type="core/template" name="marketplace_addproduct" template="marketplace/simpleproduct.phtml" />
        </reference>
    </marketplace_account_simpleproduct>
    <marketplace_account_downloadableproduct>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
            <action method="addItem">
                <type>skin_js</type>
                <script>marketplace/js/nicEdit-latest.js</script>
            </action>
        </reference>
        <update handle="customer_account" />
        <reference name="content">
            <block type="core/template" name="marketplace_addproduct" template="marketplace/downloadableproduct.phtml" />
        </reference>
    </marketplace_account_downloadableproduct>
    <marketplace_account_virtualproduct>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
            <action method="addItem">
                <type>skin_js</type>
                <script>marketplace/js/nicEdit-latest.js</script>
            </action>
        </reference>
        <update handle="customer_account" />
        <reference name="content">
            <block type="core/template" name="marketplace_addproduct" template="marketplace/virtualproduct.phtml" />
        </reference>
    </marketplace_account_virtualproduct>
    <marketplace_account_productlist>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
        </reference>
        <update handle="customer_account" />
        <reference name="content">
            <block type="marketplace/marketplace" name="marketplace_myproductslist" template="marketplace/myproductlist.phtml" />
        </reference>
    </marketplace_account_productlist>
    <marketplace_account_simpleproductedit>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
            <action method="addItem">
                <type>skin_js</type>
                <script>marketplace/js/nicEdit-latest.js</script>
            </action>
        </reference>
        <update handle="customer_account" />
        <reference name="content">
            <block type="core/template" name="marketplace_editproducts" template="marketplace/editsimpleproduct.phtml" />
        </reference>
    </marketplace_account_simpleproductedit>
    <marketplace_account_downloadableproductedit>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
            <action method="addItem">
                <type>skin_js</type>
                <script>marketplace/js/nicEdit-latest.js</script>
            </action>
        </reference>
        <update handle="customer_account" />
        <reference name="content">
            <block type="core/template" name="marketplace_editproducts" template="marketplace/editdownloadableproduct.phtml" />
        </reference>
    </marketplace_account_downloadableproductedit>
    <marketplace_account_virtualproductedit>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
            <action method="addItem">
                <type>skin_js</type>
                <script>marketplace/js/nicEdit-latest.js</script>
            </action>
        </reference>
        <update handle="customer_account" />
        <reference name="content">
            <block type="core/template" name="marketplace_editproducts" template="marketplace/editvirtualproduct.phtml" />
        </reference>
    </marketplace_account_virtualproductedit>
    <marketplace_account_configurableproductedit>
        <reference name="head">
            <action method="addCss"><stylesheet>marketplace/css/style.css</stylesheet></action>     
            <action method="addItem"><type>skin_js</type><script>marketplace/js/nicEdit-latest.js</script></action>     
        </reference>
        <update handle="customer_account"/>
        <reference name="content">
            <block type="core/template" name="marketplace_editproducts" template="marketplace/editconfigurableproduct.phtml"/>
        </reference>
    </marketplace_account_configurableproductedit>
    <marketplace_account_dashboard>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
            <action method="addCss">
                <stylesheet>marketplace/css/wk_block.css</stylesheet>
            </action>
        </reference>
        <update handle="customer_account" />
        <reference name="content">
            <block type="marketplace/products" name="marketplace_dashboard" template="marketplace/mydashboard.phtml" />
        </reference>
    </marketplace_account_dashboard>
    <marketplace_account_orderhistory>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
        </reference>
        <update handle="customer_account" />
        <reference name="content">
            <block type="marketplace/products" name="marketplace_myorderhistory" template="marketplace/myorderhistory.phtml" />
        </reference>
    </marketplace_account_orderhistory>

    <marketplace_marketplaceaccount_vieworder>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
        </reference>
        <update handle="customer_account" />
        <reference name="content">
            <block type="Sales/Order_Item_Renderer_Default" name="marketplace_view_order" template="marketplace/vieworder.phtml" />
        </reference>
    </marketplace_marketplaceaccount_vieworder>

    <marketplace_marketplaceaccount_printorder>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
        </reference>
        <update handle="customer_account" />
        <reference name="content">
            <block type="Sales/Order_Item_Renderer_Default" name="marketplace_view_order" template="marketplace/printorder.phtml" />
        </reference>
    </marketplace_marketplaceaccount_printorder>

    <marketplace_marketplaceaccount_viewtransdetails>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
        </reference>
        <update handle="customer_account" />
        <reference name="content">
            <block type="core/template" name="marketplace_view_transaction" template="marketplace/viewtransdetails.phtml" />
        </reference>
    </marketplace_marketplaceaccount_viewtransdetails>

    <marketplace_seller_profile>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/wk_block.css</stylesheet>
            </action>
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
        </reference>
        <reference name="root">
            <action method="setTemplate">
                <template>page/2columns-left.phtml</template>
            </action>
        </reference>
        <reference name="content">
            <block type="marketplace/profile" name="marketplace" template="marketplace/profile.phtml" />
            <block type="marketplace/profile" name="product_bestsell_block" template="marketplace/product_bestsell_block.phtml" />
        </reference>
        <reference name="left">
            <remove name="left.newsletter"></remove>
            <remove name="left.permanent.callout"></remove>
            <block type="marketplace/profile" name="profile_store_left_sidebar" template="marketplace/profile_store_left_sidebar.phtml" />
            <block type="marketplace/profile" name="partner_profile_right" template="marketplace/profile_right_sidebar.phtml" />
        </reference>
    </marketplace_seller_profile>
    <marketplace_seller_collection>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/wk_block.css</stylesheet>
            </action>
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
        </reference>
        <reference name="root">
            <action method="setTemplate">
                <template>page/2columns-left.phtml</template>
            </action>
        </reference>
        <reference name="left">
            <remove name="left.newsletter"></remove>
            <remove name="left.permanent.callout"></remove>
            <block type="marketplace/sellercategory" name="partner_category" template="marketplace/sellercategory.phtml" before="-" />
            <block type="marketplace/sellercategory" name="collection-left" template="marketplace/collectionleft.phtml" />
        </reference>
        <reference name="content">
            <block type="marketplace/collection" name="marketplace_collection8" template="marketplace/collectionview.phtml" />
        </reference>
    </marketplace_seller_collection>
    <marketplace_seller_location>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/wk_block.css</stylesheet>
            </action>
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
        </reference>
        <reference name="root">
            <action method="setTemplate">
                <template>page/2columns-left.phtml</template>
            </action>
        </reference>
        <reference name="content">
            <block type="core/template" name="location_form" template="marketplace/location.phtml" />
        </reference>
        <reference name="left">
            <remove name="left.newsletter"></remove>
            <remove name="left.permanent.callout"></remove>
            <block type="marketplace/location" name="profile_store_left_sidebar" template="marketplace/profile_store_left_sidebar.phtml" />
            <block type="marketplace/location" name="partner_profile_right" template="marketplace/profile_right_sidebar.phtml" />
        </reference>
    </marketplace_seller_location>
    <marketplace_seller_feedback>
        <reference name="head">
            <action method="addCss">
                <stylesheet>marketplace/css/wk_block.css</stylesheet>
            </action>
            <action method="addCss">
                <stylesheet>marketplace/css/style.css</stylesheet>
            </action>
        </reference>
        <reference name="root">
            <action method="setTemplate">
                <template>page/2columns-right.phtml</template>
            </action>
        </reference>
        <reference name="content">
            <block type="marketplace/feedback" name="review_form" template="marketplace/reviewform.phtml" />
        </reference>
        <reference name="right">
            <block type="marketplace/feedback" name="partner_profile_right" before="-" template="marketplace/profile_right_sidebar.phtml" />
        </reference>
    </marketplace_seller_feedback>


    <marketplace_transaction_info>
        <reference name="head">
        <action method="addCss"><stylesheet>marketplace/css/style.css</stylesheet></action>             
        </reference>
        <update handle="customer_account"/>
        <reference name="content">    
            <block type="marketplace/transactions" name="marketplace_transaction" template="marketplace/transactions.phtml" />  
        </reference>
    </marketplace_transaction_info>


</layout>
5
  • use this code in your local.xml <?xml version="1.0" encoding="UTF-8"?> <layout version="0.1.0"> <marketplace-index-index> <remove name="header" /> </marketplace-index-index> </layout>
    – Magento 2
    Commented Oct 26, 2015 at 12:55
  • okay, i i will try..... Commented Oct 26, 2015 at 13:16
  • i tried your code , but after this : hotwheelstoys.in/one/em0113-full-package/errors/… Commented Oct 26, 2015 at 13:24
  • 1
    use _ instead of - Commented Oct 26, 2015 at 13:28
  • @BernhardPrange i used _ , it did't worked.... Commented Oct 26, 2015 at 13:44

2 Answers 2

3

you can use xml to hide the menu and footer

 <marketplace_index_index>
    <reference name="root">
        <remove name="footer"/>
    </reference>
    <reference name="header">
        <action method="unsetChild"><alias>topMenu</alias></action>
    </reference>
 </marketplace_index_index>
34
  • 1
    your module xml in layout folder add it there. find this <marketplace_index_index> tag and add it there Commented Oct 26, 2015 at 13:24
  • 1
    Use action tag for footer too and replace topmenu to footer that will work or remove reference tag and check Commented Oct 26, 2015 at 13:36
  • 1
    <marketplace_index_index> <remove name="footer"/> <reference name="header"> <action method="unsetChild"><alias>topMenu</alias></action> </reference> </marketplace_index_index> add it like that.and check Commented Oct 26, 2015 at 13:44
  • 1
    It don't matter if it is inside the footr tag Commented Oct 26, 2015 at 13:49
  • 1
    Paste it let me look at that Commented Oct 26, 2015 at 13:57
2
<reference name="root">
<remove name="head"/>
<remove name="header"/>
<remove name="footer"/>
<remove name="breadcrumbs"/>
</reference>

Put this in your Update layout xml in CMS Page.

1
  • i need for .phtml files in under app/design/ part , not for cms pages Commented Oct 26, 2015 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.